[nycphp-talk] Hmm, how to count 'online' users?
Eddie Haber
php at haberco.com
Thu Aug 12 03:02:04 EDT 2004
There are JavaScript and flash solutions that calculate exact seconds of
every page-view. Check into those technologies.
If you really wanna know as much as you can about page-view duration and
user stickiness set up a socket connection between an invisible flash movie
on the user's page and a simple PHP socket "page-views" server. And the
funny thing is I'm not even joking.
E
> Hey gang,
>
> I am building a site where you can see how many members are logged in
> for each group. After looking around, I see that this is being done by
> forums, some CMS, and may even be integrated with PEAR's AUTH. The site
> uses ADOdb, and I am considering using ADOdb's session storage as it
> also can run user defined functions when sessions expire.
>
> So I am also certain that there are several ways to tackle this
> problem. Knowing that performance and scalability is an absolute must,
> what is the best approach?
>
> #1) In the accounts table, also have a column of 'logged_in', as a
> boolean; and then count the 'true's for each group.
> #2) Create a linked table, 'group_counts'; and store each account_id in
> there while the session is still active
> #3) ???
>
> This group is hot enough that I am certain some of you have come up with
> very solid approaches to this problem - and I wanna hear them!
>
> -- Mitch
>
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org
More information about the talk
mailing list