title: PHP session timeout callback?
body: <p>I'm running a PHP + APACHE + CENTOS Linux combination.</p>
  
  <p>I have implemented a login &amp; logout on the website. </p>
  
  <p>My question is, how can I know when the php session has timed-out (User has closed his browser without logging-out)?</p>
  
  <p>The reason is, I want perform some cleanups and/or database updates (calling another PHP) when the user has done any of the following:
  (1) LOGGED-OUT  or (2) TIMED-OUT</p>
  
  <p>My guess is that I would have to make use of Apache/Linux, right?</p>