Re: [PHP3] number of users on a site

From: Date: Wed, 07 Jun 2000 07:08:30 +0000
Subject: Re: [PHP3] number of users on a site
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-1162@lists.php.net to get a copy of this message
In article <10213105561.20000601104351@softhome.net>, kesl-lists@softhome.net (Matjaz Vrecar) wrote: > MR> There's no formal message sent by a browser when it leaves your > MR> site, so at best you'll have to make a few assumptions regarding > MR> your visitors (in > > I dont want to keep track of this by myself, instead of this I thought > there is some PHP/apache variable which would tell me the number of > clients currently connected to "a page / a site"? I suppose you could so something goofy to try and find out how many of your httpd processes are actually doing something... exec("ps auxwwww | grep httpd | grep -v grep", $busy, $error); while (list(,$line) = each($busy)){ echo $line, "<BR>\n"; } if ($error){ die("OSError $error: Usually means the user running PHP doesn't have the right path/permissions to do that."); } Presumably somewhere in that output, or maybe from some variant on top or something, you could find out how many of your httpd processes are actually servin' up the goods at any given point in time. Neither Apache nor PHP is keeping track of this (essentially useless) number. I can find no other useful way to construe your question, so I recommend you think more carefully about how HTTP actually works... -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#1162) next »