Re: Total Server Sessions

From: Date: Mon, 03 Jan 2005 13:44:09 +0000
Subject: Re: Total Server Sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-205517@lists.php.net to get a copy of this message
On Mon, 3 Jan 2005 23:02:19 +1100, HarryG <harry1980@gmail.com> 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/

« previous php.general (#205517) next »