Re: Online Users

From: Date: Fri, 02 Jul 2004 05:13:14 +0000
Subject: Re: Online Users
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-189508@lists.php.net to get a copy of this message
Is it possible to make a table of all logged in users session ids and then check to see if the session still exists every couple minutes? So every minute or two, it would go through the table and for each record it would get the session id, then check that session id to see if it's still in existance. Is this possible to do? Thanks, Matt http://sweetphp.com "Zareef Ahmed" <zasaifi@yahoo.com> wrote in message news:20040702032807.18736.qmail@web13607.mail.yahoo.com... > Hi, > If you are using a database on your server you can > do this as follows: > 1. Make a table named > active_users(userid,last_access); > 2. Record every visit of a user to any page. > 3. you can delete the entries from this table on a > condition like :: > delete from active_users where last_access is less > than (currenttime-MAX_EXPIRE_TIME) > 4. Display row count of active_users to visitors. > > This is just a hint. Some knowldge of php/any database > assumed , > > Revert back with any comment or problem. > > zareef ahmed > > > --- Curt Zirzow <php-general@zirzow.dyndns.org> wrote: > > * Thus wrote Matt Palermo: > > > they click the logout button). Basically I want > > to be able to keep a list > > > of all currently active users. So if they close > > out their browser, it will > > > remove their name from the list (within a > > reasonable time frame). I'm > > > ===== > Zareef Ahmed :: A PHP Developer in Delhi(India). > Homepage :: http://www.zasaifi.com > > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - 100MB free storage! > http://promotions.yahoo.com/new_mail

« previous php.general (#189508) next »