问题
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