Re: Online Members
| From: | Nathan Nobbe | Date: | Sat, 27 Dec 2008 19:34:17 +0000 |
| Subject: | Re: Online Members | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285106@lists.php.net to get a copy of this message | ||
If you're talking about tracking the number of visitors with presently open
sessions at your website...
>
> I was just browsing the tutorials form at PHP Developer Network and saw
> this :
> http://forums.devnetwork.net/viewtopic.php?f=28&t=29342
>
> Looks like it does what (I think) you were trying to describe.
the above link winds up at a dead end,
http://webmonkey.wired.com/webmonkey/04/50/index4a.html
there are many ways to do this, depending upon how you store the session,
you may be able to crawl a list of them. w/ the stock session support there
are a number of files in /tmp, which would be a place to start.
however, id probly just drop a counter in the database when a session is
created and remove it when said session is destroyed. then all youd ever
have to do is lookup that number.
this you could achieve via session_set_save_handler()
-nathan