On Mon, 3 Jan 2005 23:02:19 +1100, HarryG <[EMAIL PROTECTED]> wrote:
> Is there an easier way to count the total number of sessions running on a
> PHP webserver? something like session_count();
> 
> I've seen some php site where it tells you how many people are currently
> online, which I guess is being done by keeping a count of total sessions
> running on the server

It's a piece of cake if you use database driven PHP sessions.

http://destiney.com/pub/Destiney_db_sessions_0.1.0.tar.bz2

Once you get your PHP sessions running inside a database counting the
sessions is just a select count(*) from sessions query.  You can even
force garbage collection before the count to get a realtime count.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to