<?phpset_time_limit(0);//This is the file where we save the information$fp = fopen (dirname(__FILE__) . '/localfile.tmp', 'w+');//Here is the file we are downloading, replace spaces with %20$ch = curl_init(str_replace(" ","%20",$url));curl_setopt($ch, CURLOPT_TIMEOUT, 50);// write curl response to filecurl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);// get curl responsecurl_exec($ch); curl_close($ch);fclose($fp);?>


