RE: [PHP] session timeouts
| From: | Maxim Maletsky | Date: | Tue, 21 Aug 2001 01:30:23 +0000 |
| Subject: | RE: [PHP] session timeouts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-63595@lists.php.net to get a copy of this message | ||
my favorite way "to session" people is by sticking an MD5 hash string to
every browser (except the once having it already) as a cookie valid for the
next 32 years or so. Then I log their actions in a database. This way I can
practically do any kind of checks as long as user accepts cookies, otherwise
I would issue them a static GET variable sticking to every URL.
So, answering your question: - YES.
If you would be sessioning users in the same way as I do, you would be able
to log them in a db with a time stamp and check against it on every request
- "your own clock is the best clock".
Besides that, you can also keep setting cookies for a limited amount of time
and then check if the variable exists or not (expired and thus not sent) - a
silly traditional method, but works.
Sessions also have their own customizable lifetime. Which works in the
exactly same way as cookies do.
read on php.net/sessions
Cheers,
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Nigel_Soon@advanis.ca [mailto:Nigel_Soon@advanis.ca]
Sent: Tuesday, August 21, 2001 8:53 AM
To: php-general@lists.php.net
Subject: [PHP] session timeouts
Hi,
I'm writing a web survey in php and trying to set session timeouts. I have
a main script that starts the session and displays the pages. Is there a
way I can make the session timeout if they idle for too long?
Thanks,
Nigel
--
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