Re: [phplib] current users? From: tps <email protected>
Date: 08/21/01

On Tue, Aug 21, 2001 at 09:09:09PM -0500, Michael Chaney wrote:
> On Tue, Aug 21, 2001 at 09:33:36PM -0400, tps <email protected> wrote:
> > Hi folks.
> > I've been beating my few brains out trying to figure out how to
> > tell how many users, and who they are, have active sessions. This
> > looks to be straight forward, but I must not be much of a programmer
> > since I can't figure out how to do this. Anyone have a pointer, or code
> > snipet?
>
> How do you define an active user? Think about that. If you want to
> know how many people have brought up a page in the last 15 minutes, you
> can do that easily with a query (this is MySQL):
>
> select count(*) from active_sessions
> where changed>=date_format(now()-interval 15 minute,'%Y%m%d%H%I%S')
> and name='CE_Session';
>
> You can easily use something like that to remove the inactive sessions
> via a simple cron job every 15 minutes or so, and alleviate the problem
> of "garbage collection" in your web application.

This much I have. I'm sorry. I wasn't clear enough. I have a site I'm
building that requires authenticated access. This is working fine. I was
asked if I can show how many people are using the site at any time. I can
get that from the active sesions. Great. Now they want to be able to see
from an admin screen that auto-refreshes every 2 minutes, who is authenticated
to the site.

Does that explain a little more what I'm looking for?

Thanks,
Tim

-- 
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
   >> Tim Sailer (at home)             ><  Coastal Internet, Inc.          <<
   >> Network and Systems Operations   ><  PO Box 671                      <<
   >> http://www.buoy.com              ><  Ridge, NY 11961                 <<
   >> tps <email protected>/tps <email protected>     ><  (631) 924-3728                  <<
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>