I'm developing a web app with PHP. The requirement is that the user has to login into the website. I'm using session variables for this. The session should expire after 10 minutes of inactivity and the browser have to forward to the login page. At the moment I'm not sure if I can solve it with the following php functions:
session_cache_limiter('public');
session_cache_expire(10); //should expire after 10 minutes inactivity
But I'm not sure if this expires the session after 10 minutes inactivity. I guess it will expire in general after 10 minutes. If it does it, how can I call an session exit handler?
The other way is to log the current time at each activty. How can I log touch events in Chrome? Is this possible? Without touch event logging it makes no sense.