title: Detecting and storing logout times
body: <p>My application currently stores some basic _SESSION events, such as login and each page/URI requested.  I've been asked to enhance event logging to include tracking when users log out. </p>
  
  <p>The trouble with logouts is that users don't always remember to click a dedicated Logout button.  Sometimes they just leave the browser open, or close the open browser windows, or simply shut down.  I can't always be guaranteed an exact logout event. </p>
  
  <p>I can get a rough idea of user logout times by querying my event table for periods of no activity, however this seems roughshod.  </p>
  
  <p>Is there a best practice for detecting passive logouts in PHP?</p>