Check if window is refreshed?
Posted: Tue Apr 26, 2005 4:53 pm
Is there anyway in PHP to check if the window has been refreshed?
I've been trying to use this function, but I discovered $_SERVER['HTTP_REFERER'] doesn't return that page if you refresh it, just the one you were to get to this page.
EDIT: The HTTP_REFERER is something like http://www.website.com/KoD/game/game.ph ... $timestamp
I've been trying to use this function, but I discovered $_SERVER['HTTP_REFERER'] doesn't return that page if you refresh it, just the one you were to get to this page.
Code: Select all
function check_refresh($timestamp) {
$referer = $_SERVERї'HTTP_REFERER'];
$ref = explode('&',$referer);
$oldstamp = explode('=',$refї1]);
$oldstamp = $oldstampї1];
if($oldstamp == $timestamp) {
echo "e;Please do not refresh the page!"e;;
}
}