$url = 'http://img.evolife.cn/2015-02/97901c5922d10fd1_thumb.jpg';
$opts = array(
'http'=>array(
'user_agent' => $_SERVER['HTTP_USER_AGENT']
)
);
$context = stream_context_create($opts);
$img = file_get_contents($url, false, $context);file_put_contents(basename($url), $img);
$opts = array(
'http'=>array(
'user_agent' => $_SERVER['HTTP_USER_AGENT']
)
);
$context = stream_context_create($opts);
$img = file_get_contents($url, false, $context);file_put_contents(basename($url), $img);
高手在人家 非常感谢