Save as web page using php

北城以北 提交于 2020-01-16 03:58:06

问题


How to save a web page using php similar to save as in Browser -> file -> save page as I need to save web page dynamically when url is given as parameter. Containing the images in related folder.

Thanks in advance :)


回答1:


You would need to use php curl to download the HTML from that page.

After that you need to scrape the content of images, css, js and other files and download and save them conserving the path, by using readfile() function.



来源:https://stackoverflow.com/questions/16476210/save-as-web-page-using-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!