Log Out Script
Posted: Thu Jan 29, 2009 11:05 pm
I have a log in script that set's a cookie, each page they visit looks for this cookie, if they don't have it, they are directed to the log in screen. When user's log out it runs the script below to delete the cookie, which works fine.
Problem is that the pages they have visited can still be seen if they haven't closed there browser because it stores them in temp internet files. Is there a way to delete it from temp internet files, or make it get an updated version of the page each time they try to access it?
I think i've seen it done before in the header, it sets a time on how long the page is valid for or something?
Code: Select all
<?php
$past = time() - 200;
//this makes the time in the past to destroy the cookie
setcookie(ID_my_site, gone, $past);
setcookie(Key_my_site, gone, $past);
header("Location: /gaming/index2.php");
?>I think i've seen it done before in the header, it sets a time on how long the page is valid for or something?