Re: Preventing Multiple Log-Ins after Authentication

From: Date: Wed, 17 Jul 2002 07:13:16 +0000
Subject: Re: Preventing Multiple Log-Ins after Authentication
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-108037@lists.php.net to get a copy of this message
I agree. Using a database is usually a good way of storing session information. But as noted by Dennis below, automatic logout may require additional scripts running in the background. This is a bit inferior in PHP compared to ASP. In ASP, support for automatic session destruction is implemented by having a "magic" function (called Session_End) which will be called automagically by the web server whenever a session expires. Having this in PHP would be very nice too! /lasso (lasso@lassoweb.nu) Dennis Moore wrote:
If you do not want to use cookes and use SID or trans SID; Another method is to track your logins via a database. This can be resource intensive
though.    You need to update the database upon each click or have an empty
window refresh every 1-5 minutes. If there is no activity for 15 or 30 minutes automatically log the person off in the database. This requires a process to run in cron or a separate background program. The advantage of this is that is very easy to add time based accounting to the session management system.


« previous php.general (#108037) next »