title: PHP Session expire after x minutes of inactivity
body: <p>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:</p>
  
  <pre><code>session_cache_limiter('public');
  session_cache_expire(10); //should expire after 10 minutes inactivity
  </code></pre>
  
  <p>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?</p>
  
  <p>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. </p>