if(!session_is_registered("session_count")) {
$_SESSION['session_count']=0;
$_SESSION['session_start']=time();
}
$session_timeout = 20; // in sec
$session_duration = time() - $_SESSION['session_start'];
if ($session_duration > $session_timeout) {
header("Location: timeout.php");
}
$_SESSION['session_start']= time();
$_SESSION['session_count']++;
if the time reaches 20 seconds, the page should be redirected to timeout.php which is not working for me.
pls help me.....