$config['sess_expiration'] = 7200; on my config.php file, Which means that session last in 2 Hours.
By default the session is created up on user LOGIN. Now i want to last session based on User IDLE state.
So when user is active on page i need to renew the session.
A POLL to server on every 2 minutes through ajax with current user status ,
if the status is
ACTIVE then i want to extent/renew/update the session timeout for another 2 hours from the ajax call.
Infact IF the status is
IDLE i will run a timer on web page and before it reaches its timeout (2 hours) i need to display a warning to user ==>
"Your Current session is about to expire. Do you want to renew session ?"
If user clicks
YES then i want to extent the session for another 2 hours,else i will send an LOG OUT command.
So the Question is : How i renew/update/extent the session timeout programically ?
Also is there any other better solutions available.
I am using PHP 5 , Codeigniter 2.x , Bitauth( User Authentication ).