Reputation: 379
I have a PHP script that dynamically creates a HTML file. In command line, I would like to load all elements in the HTML file. So let's say the HTML file has these elements: img src="http://www.test.com/image.php" ... iframe name="xxx" src="https://www.abc.com" ... I would like the Web servers test.com and abc.com to actually receive my request.
Is there a way to do that in command line? What I tried so far is to make my HTML accessible via my local Web server and fetch the file with "wget --mirror", but no success.
Thank you for your help.
Upvotes: 2
Views: 1543
Reputation: 449485
wget --mirror
is definitely the way to go.
To make sure it loads the external references, add --page-requisites
:
This option causes Wget to download all the files that are necessary to properly display a given HTML page. This includes such things as inlined images, sounds, and referenced stylesheets.
Upvotes: 3