PHP script to download a website with its files -


i need php script similar "save page as" button in firefox or other browsers. is: given url, downloads associated html file, images , other files displayed in it. file_get_contents() function gets me halfway there, getting html file not images or other files. solution read through html returned file_get_contents() , every file link found, apply file_get_contents() it. yet suspect there must more standard solution already. in advance.

the easiest way use wget command:

wget --page-requisites http://www.yourwebsite.com/directory/file.html 

from php can invoke using exec or system.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -