Page 1 of 1

Html Pages Archiving

Posted: Sat Oct 20, 2007 3:48 pm
by php_ghost
Hi everyone.

I need help in archiving web pages from a website.

the original link is something like this

Code: Select all

index.php?mact=News,cntnt01,detail,0&cntnt01articleid=154&cntnt01returnid=58
Now I want to save it in an archive folder in the web host where in it will no longer have to access the database. It's like a saved page and not a php file anymore.

Or if you guys have any other ideas on how to do this in a different way (not necessarily save the file as an html page) please help me guys.

Thanks in advance. :wink:

Posted: Sat Oct 20, 2007 4:51 pm
by Ambush Commander
It should be too difficult to munge the filename into another form that can be an HTML file, though if you're not going to have the database you'll need to either archive the database or use the PHP to pass the user to the HTML cache file.

Posted: Thu Oct 25, 2007 11:54 am
by php_ghost
nevermind guys i already found a way.

I used file() to read the result of index.php?mact=News,cntnt01,detail,0&cntnt01articleid=154&cntnt01returnid=58

All I need to do now is to save it as an html file and place it in the appropriate folder.

Posted: Thu Oct 25, 2007 12:38 pm
by s.dot
file_get_contents() and file_put_contents() (php5+) may be more appropriate for such a task.