Curl is used to fetch the Remote content in to a file in HTML format
$ch = curl_init(“http://www.google.com/”);
$fp = fopen(“sample.txt”, “w”);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
The Above code will retrieve content in HTML format from ‘www.google.com’ and store in the file named ‘sample.txt’.