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

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

WBOY
Release: 2016-06-21 09:06:48
Original
1481 people have browsed it

$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');
?>



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template