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

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -