How to check idle time using jQuery and PHP?
I have a script that uses PHP SESSION . I manage PHP sessions using a class. Within this class I have a method that returns how many seconds remaining before the session expires. Also, Evey time the user refresh the page or open a new page (new request to the server) the idle time counter starts over $_SESSION['MA_IDLE_TIMEOUT'] = time()+900; What I am looking to do is display a dialog message 2 minutes before the PHP session expire and check if the user is still on the page or not. If the use clicks "Keep working" then the jQuery script will send PHP AJAX request to renew the session $