It's probably alot more efficient to set up a scheduled job which
removes timed out users every minute.  This keeps your 'check and see if
the user is expired' code from running any more frquently than it needs
to be.

george

Toby Butzon wrote:
> 
> Set up an expire time... if a user hasn't accessed the page
> showing the room's activity (where all the messages are
> shown) within, say, 3 minutes, then the next request that
> comes in, regardless of who makes it, should remove the
> timed-out user from the list.
> 
> It's important, of course, to make sure all of the chat
> windows are refreshing faster than your timeout value; a
> refresh rate of 3 minutes or more wouldn't be very
> convenient anyway ;)
> 
> --Toby
> 
> ----- Original Message -----
> From: "sarahana" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 14, 2001 11:04 AM
> Subject: [PHP-DB] Desperate Help needed
> 
> Hi,
> I made a database chatroom that seemed to be working
> perfectly fine - now, it seems, if more than two people log
> in, the 1st person of the three automatically gets logged
> out - its because i tried to make an automatic log off for
> those who cross the window....
> 
> How do you detect if a person has closed the window (hence
> killing the cookie) without logging off (so the database
> still has him listed, and therefore is shown to be online)?
> 
> Here's the scenario:
> 1. one table lists the chatters' names
> 2. second table has 25 rows for each messages, they keep
> getting replaced as the new messages come in
> 
> the problem: the chatters table lists those users who logged
> out ages ago...
> 
> thanks.
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
$_ = 'George Schlossnagle';
s#.#(ord$')-(ord$&)+((index($_,$')-$&)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print
join('',(map chr$_,reverse
map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/);


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to