1 function curl_download($remote, $local) {
2 $cp = curl_init($remote);
3 $fp = fopen($local, "w");
4
5 curl_setopt($cp, CURLOPT_FILE, $fp);
6 curl_setopt($cp, CURLOPT_HEADER, 0);
7
8 curl_exec($cp);
9 curl_close($cp);
10 fclose($fp);
11 }
2 $cp = curl_init($remote);
3 $fp = fopen($local, "w");
4
5 curl_setopt($cp, CURLOPT_FILE, $fp);
6 curl_setopt($cp, CURLOPT_HEADER, 0);
7
8 curl_exec($cp);
9 curl_close($cp);
10 fclose($fp);
11 }