RE: [PHP] Expiration Time of sessions

From: Date: Wed, 06 Dec 2000 04:56:40 +0000
Subject: RE: [PHP] Expiration Time of sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28846@lists.php.net to get a copy of this message
Thanks for replying, but I am not sure I understand. Even if a cookie with the name Session is created to last one hour, why would the session created with session_start() expire after one hour ? Is there a relationship. What do you mean by performing a check with HTTP_COOKIE_VARS? I konw I can explicitaly terminate a session and kill the registered variables with session_unregister() and session_destroy(), but I am looking for a way to generate a session that expires by itlsef after x minutes of incativity? Thanks in advance. Claude. -----Message d'origine----- De : painkiller@libero.it [mailto:painkiller@libero.it] Envoyé : 5 décembre, 2000 10:12 À : techsupport@devises-or.ca Objet : Re: [PHP] Expiration Time of sessions You can set a cookie that expires after a selected period of time, so if you want to keep a session open for one hour you can use: setcookie("Session","OK",time()+3600); after that you only perform a check (with HTTP_COOKIE_VARS) on everything you set :) > Hi!, > > What is the best way to have an expiration time on a session? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list- admin@lists.php.net > >

« previous php.general (#28846) next »