For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > November 2005 > counting users









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author counting users
Bruintje Beer

2005-11-20, 7:56 am

Hi,

Does somebody know how to count all active users in php logged in on your
website. How do you catch when a user leaves yur site and decrement the
login count.

John


J.O. Aho

2005-11-20, 7:56 am

Bruintje Beer wrote:
> Hi,
>
> Does somebody know how to count all active users in php logged in on your
> website. How do you catch when a user leaves yur site and decrement the
> login count.


You store the "sessions" used in some kind of "database" with the "time", each
time someone access a page, the "time" is updated, check the "database" and
see how many has been updated the last X minutes and there you get how many
are active.

You never really can do any exact measurement.


//Aho
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com