Home >php教程 >PHP源码 >采集网站资源

采集网站资源

PHP中文网
PHP中文网Original
2016-05-25 17:09:392177browse

采集网站资源

$content = file_get_contents('http://www.163.com'); 
file_get_contents() 
$file = fopen("163.htm","w"); 
fwrite($file, $content);//百度首页8K 
fclose($file);

如果要下载全部的东西,可以分三步实现: 
1.file_get_contents()页面 
2.file_get_contents() 页面包含的js,css ,
3.copy() css中的图片

 以上就是采集网站资源的内容,更多相关内容请关注PHP中文网(www.php.cn)!

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