I have a page that I would like to archive in a different directory.
The way I do this at the moment is to copy & paste the source code into a new file, then uploading the file.
Is there a better way?
I would like to click an "archive this page" button, which would magically duplicate this page into a new file with a new filename.
Any ideas would be very welcome.
Archiving
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: Archiving
Tried using this copy command, but no joy.
The problem I have is the page I want to copy is generated using php.
I only want the html source to be saved as it's for archiving purposes.
I can copy the php file to another php file, but that will still be a dynamic page, which I don't want.
If I copy it to a html page, it doesn't work (the page is created, but the text doesn't print).
Hope this makes sense.
Wayne.
The problem I have is the page I want to copy is generated using php.
I only want the html source to be saved as it's for archiving purposes.
I can copy the php file to another php file, but that will still be a dynamic page, which I don't want.
If I copy it to a html page, it doesn't work (the page is created, but the text doesn't print).
Hope this makes sense.
Wayne.
Re: Archiving
if you want to get generated pages, use
Code: Select all
<?
$url=file_get_contents("http://www.google.com/");
$file="google_index.html"; // or what ever you want...
$fh = fopen($file, 'w+');
fwrite($fh, $url);
fclose($fh);
?>