Re: Sessions and PHP
| From: | Chris Shiflett | Date: | Thu, 25 Mar 2004 04:17:39 +0000 |
| Subject: | Re: Sessions and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181441@lists.php.net to get a copy of this message | ||
--- Patrik Fomin <pafo@pafo.net> wrote:
> is there anyway to get the number of people connected to the site?
> in asp you just use Application and session_terminate to accomplish
> this is there anyway to do this in PHP?
Taken literally, you are asking about the number of active connections,
meaning people who happen to be in the middle of sending or receiving an
HTTP message.
I think you mean something else, which is how many people have visited
your site recently. You just have to determine what you consider to be
recently, and then count the number of active sessions whose last visit is
within that threshhold.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming Fall 2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/