If I have a link, how do I save that webpage source in a file using php without displaying it?
I also want to be able to process a webpage so that I could modify it then send the output to the browser.
How do I do this?[/u]
process/save webpage from list of links
Moderator: General Moderators
-
jaymoore_299
- Forum Contributor
- Posts: 128
- Joined: Wed May 11, 2005 6:40 pm
- Contact:
file_get_contents and the http(s) stream wrappers enabled it's a breeze...
Code: Select all
$file = file_get_contents('http://timvw.madoka.be/thief.php');
// store file (php5 only function)
file_put_contents('thief.txt', $file);
// convert to lowercase and display
echo strtolower($file);