i need logout code for apllication. This code is working properly but the issue is when the mouse moments on that browser it's not working can you tell me please..
$url = BASE_URL; $url1='home/logout'; $TimeOutMinutes = 5; // This is your TimeOut period in minutes $LogOff_URL = $url.''.$url1; // If timed out, it will be redirected to this page $TimeOutSeconds = $TimeOutMinutes * 60; // TimeOut in Seconds if (isset($_SESSION['SessionStartTime'])) { $InActiveTime = time() - $_SESSION['SessionStartTime']; if($InActiveTime >= $TimeOutSeconds) { echo "<script type='text/javascript'> window.onload = function () { top.location.href = '" . $LogOff_URL . "'; }; </script>"; } } $_SESSION['SessionStartTime'] = time();