Another possibility is after each page call to rewrite the client's cookie's validity 
to, say, current time + 1800s:

session_start() ;
setcookie( session_name(), session_id(), time()+1800, "/" ) ;
ob_start() ;
// etc.

If the user does not call a page for more than 30', the cookie will be destroyed, in 
effect destroying the session.

  ----- Original Message ----- 
  From: John W. Holmes 
  To: 'Allens' ; [EMAIL PROTECTED] 
  Sent: Friday, December 20, 2002 1:57 PM
  Subject: RE: [PHP-DB] Set Logout Time for No Activity

  >    Is there a variable in php.ini that will allow you to log someone
  > if there is no activity of 30 minutes or greater from the logged in
  > user? Thanks in advance. :)

  No, not really. You can use sessions, for something like this, though.
  You start a session and look for a variable within it before you proceed
  with the page. If the user is inactive for a while, the session will be
  cleaned up and not exist when you go to check it, so you make them log
  in again. You can control the session garbage collection time in

  ---John Holmes...

  PHP Database Mailing List (
  To unsubscribe, visit:

Reply via email to