PHP cURL functions tutorial | PHPSense.com
Here we have used another of the cURL options, CURLOPT _FILE. Obtain a file handler by creating a new file or opening an existing one and then pass this file handler to the curl_set_opt function. cURL will now write the contents to a file as it downloads ...