Connecting Tech Pros Worldwide Forums | Help | Site Map

Executing Code on session timeout

Team 4 Profit
Guest
 
Posts: n/a
#1: Mar 3 '07
Hi all,
is it possible to execute some code on the session timeout event?
i.e. clear all db information and other stuff when the php session is
destroyed through the gc_maxlifetime timeout.

Thanks in advance.



Rik
Guest
 
Posts: n/a
#2: Mar 3 '07

re: Executing Code on session timeout


On Fri, 02 Mar 2007 20:12:32 +0100, Team 4 Profit <team4profit@gmail.com>
wrote:
Quote:
Hi all,
is it possible to execute some code on the session timeout event?
i.e. clear all db information and other stuff when the php session is
destroyed through the gc_maxlifetime timeout.
Create your own session_handler:
http://www.php.het/session_set_save_handler

--
Rik Wasmus
andrea
Guest
 
Posts: n/a
#3: Mar 5 '07

re: Executing Code on session timeout


Create your own session_handler:Thank you very much.
It is exactly wath I need.

There is also something like the ASP Application object in PHP?

Thanks


Rik
Guest
 
Posts: n/a
#4: Mar 5 '07

re: Executing Code on session timeout


andrea <nospam@nospam.comwrote:
Quote:
Quote:
>Create your own session_handler:
>http://www.php.het/session_set_save_handler
>>
>
Thank you very much.
It is exactly wath I need.
>
There is also something like the ASP Application object in PHP?
Not a built in one to my knowledge, never really needed one. I usually
parse some ini-files to constants from outside the root.
--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is wrong.
Ask Smart Questions: http://tinyurl.com/anel
Willem Bogaerts
Guest
 
Posts: n/a
#5: Mar 6 '07

re: Executing Code on session timeout


There is also something like the ASP Application object in PHP?

Not until you write one. Most application or session-related
functionality is done with functions or superglobals. I usually write an
application class that features methods for retrieving page parameters
(with built-in register-globals-correction and the possibility to return
other types than strings), access to the backend object, and
application-wide stuff, like user feedback messages and application
settings.

Best regards
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Closed Thread