It is a PHP library and a command line tool that helps us to send files and also download data over HTTP and FTP. It also supports proxies, and you can transfer data over SSL connections.

BY Best Interview Question ON 26 Jan 2019

Example

Using cURL function module to fetch the abc.in homepage

$ch = curl_init("https://www.bestinterviewquestion.com/");
$fp = fopen("index.php", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);