Home  >  Article  >  php教程  >  如何把这里的图片抓取到本地

如何把这里的图片抓取到本地

WBOY
WBOYOriginal
2016-06-21 09:06:481319browse

$str = '';
$fp = fopen('http://www.bocobo.com/PUBLIC_PAGES/show_img.jsp?book_id=177', 'r');
while($tmpStr=fread($fp, 1024))
$str .= $tmpStr;
fclose($fp);

$fp = fopen('http://www.pushad.com/Info/AA.GIF', 'w');
fwrite($fp, $str);
fclose($fp);

echo '';
?>


copy('http://www.bocobo.com/PUBLIC_PAGES/show_img.jsp?book_id=177' , 'aaaaaa.jpg');
?>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn