RE: [PHP] anyway to do a 'whos online' from session variable?
| From: | Timothy Hitchens \(HiTCHO\) | Date: | Tue, 07 Jan 2003 23:11:58 +0000 |
| Subject: | RE: [PHP] anyway to do a 'whos online' from session variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130641@lists.php.net to get a copy of this message | ||
Simple create a database table for logins and have a status that you
set to online / offline and last seen could also be added.
Then it is just a simple SELECT statement.
If you don't want to use a database you could flock (not perfect) a file
then read in a serialised array and update then write out and unlock.
HiTCHO has Spoken!
Timothy Hitchens (HiTCHO)
tim@hitcho.com.au
> -----Original Message-----
> From: Jeff Bluemel [mailto:jeff@domintcom.com]
> Sent: Wednesday, 8 January 2003 9:08 AM
> To: php-general@lists.php.net
> Subject: [PHP] anyway to do a 'whos online' from session variable?
>
>
> when a user logs into my system I set a variable
> $_SESSION['username']. now, every page somebody pulls up it
> revalidates their login so somebody cannot get into the
> backend of the system.
>
> now - is there a way I can make a utility that will show me
> the session username's that are in use? it would be useful
> to be able to know who's currently online. this is a website
> that will not be published, and is used for a VERY limited
> number of people.
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>