Is there some way to type a URL in a text field, click submit on my page and use PHP to download all content from that URL with wget, saving the files to a folder on my server?
See Question&Answers more detail:osIs there some way to type a URL in a text field, click submit on my page and use PHP to download all content from that URL with wget, saving the files to a folder on my server?
See Question&Answers more detail:osYes.
You can use PHP exec()
function (or similar) to execute external commands (such as wget
).
If you need all site assets then I'd use the options for wget
. Otherwise, if you just need the page content, I'd do it natively with PHP as suggested in the comment from DaveRandom.
Note: Use at your own risk... The scenario you describe is dripping with evil.