1.

What is the use of cURL()?

Answer»

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.

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);



Discussion

No Comment Found