off the top of my head...

have a column in your user table called "last_active"... it should hold a
date-time, or a unix timestamp, or something like that.

on each page request by a logged in user, you would update that value with a
newer stamp

on physical logout, you would set that to zero or null.

on login, you would check that the value is either zero, or that there has
been at least "X" seconds/minutes passed since the user was last active.

if a user tries to log-in whilst still "active", you'd need to tell them
what happened, explain there's a wait time, or get them to force-logout via
an email sent to their member email address or something.


justin






on 02/06/03 10:38 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED])
wrote:

> ok so i worked out the connection_status and connection_abort will only
> work if the script is actually running and a request to the server , so i
> wont be able to tell if someone had closed the browser or not , what i'd
> like to know is , how can i tell if a user has not accessed the script for
> a certain ammount of time , i need this to calculate the idle time to
> prevent multiple logins , although a static idle time will let a multiple
> login after that and then the first login will get kicked , any ideas ?
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to