Re: Checking how many users are logged in?
| From: | Greg Donald | Date: | Sun, 03 Mar 2002 05:40:47 +0000 |
| Subject: | Re: Checking how many users are logged in? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86954@lists.php.net to get a copy of this message | ||
On Sat, 2 Mar 2002, Leif K-Brooks wrote:
>I have a site with logins, etc. I was wondering if there's any way to see
>how many users are logged in. I know I could change a database and add one
>to a number when a user logs in, and subtract one when they log off, but
>what if they just go to another site or close their browser?
I use database managed sessions and count the number of "active"
sessions, like how many sessions have had activity in the last 5 minutes
or so.
You can get this code out of phplinks if you want, from
http://phplinks.org/.
--
-----------------------------------------------------------------------
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
-----------------------------------------------------------------------