How do you make a page expire after it has been idle for a period of time?
Nov 27th, 2008 05:03
healthy man, dman, Brian Broadhead, Jonathan Sharp, John Chen, http://www.ttnr.org
Since the HTTP protocol is stateless meaning once the user has all the
requested data from the server the connection stops, it's not possible
to have PHP expire a page after it has been idle on an end users
just do a <meta http-equiv="Refresh"
the 3600 is the number of seconds to expire the page and
expiredNotice.php is the page the user will be sent to.
If you mean a page on your server, PHP can find the date of the
file/page... put your date checking code at the top of the file...
UNLINK filename; (if old)
send some excuses to client;
EXIT; to stop execution.
If you want to auto.check all your files, Make a private page for
yourself to check all/some pages...
Better still... get the private page to send you the dates in
cronological order instead... it might be safer!!!!!