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

采集网站资源

PHP中文网
Release: 2016-05-25 17:09:39
Original
2181 people have browsed it

采集网站资源

$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中的图片
Copy after login

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

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
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template