Re: Session Events

From: Date: Wed, 26 Jun 2002 20:30:49 +0000
Subject: Re: Session Events
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104063@lists.php.net to get a copy of this message
Well, since HTTP is stateless you can really say that this event happens in either of two places: - The next page accessed by the user with that session ID - As an event in the backend. If it's the first, I would recommend just having a lib_session that verifies a timer or whatever and then redirects the page or whatever. If it's something in the back-end, like a user accesses a page and you need to do clean up 30 minutes after that user goes inactive, then I recommend that is done in like a database stored procedure. On Mon, 2002-06-24 at 20:37, Joe Krause wrote: > Is there anyway to have PHP execute a function or object method > automatically when a session is expired? In JAVA, you can define an > httpSessionBindingEvent which will notify an object when it is bound to or > unbound from a session. This may be the result of a servlet programmer > explicitly unbinding an attribute from a session, due to a session being > invalidated, or due to a session timing out. I need this behavior in PHP. > > Joe Krause > > > > -- This email was sent with Ximian Evolution.

« previous php.general (#104063) next »