请问如和使用PHP将一个网页完整地保存到本地啊
思路已经有了谁来实现下
思路已经有了谁来实现下
<?php
$content = file_get_contents('http://www.baidu.com');
$file = fopen("baidu.htm","w");
fwrite($file, $content);//百度首页8K
fclose($file);
/*____________________*/
如果要下载全部的东西,可以分三步实现:
1.file_get_contents()页面
2.file_get_contents() 页面包含的js,css ,
3.copy() css中的图片
- 上一篇:【黑客收藏版】结尾用
- 下一篇:采集网站资源
精彩图集
精彩文章






