你可以做fopen。
$contents = file_get_contents('http://****.com/file.jpg');
$handle = fopen('yourfilename.jpg',"w");
fwrite($handle,$contents);
fclose($handle);
或者尝试 curl 进行下载。
http://phpsense.com/2007/php-curl-functions/
/**
* Initialize the cURL session
*/
$ch = curl_init();
/**
* Set the URL of the page or file to download.
*/
curl_setopt($ch, CURLOPT_URL, ‘http://news.google.com/news?hl=en&topic=t& output=rss’);
/**
* Ask cURL to return the contents in a variable instead of simply echoing them to the browser.
*/
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/**
* Execute the cURL session
*/
$contents = curl_exec ($ch);
/**
* Close cURL session
*/
curl_close ($ch);