You are here: Re: Count visitors on my website « PHP Programming Language « IT news, forums, messages
Re: Count visitors on my website

Posted by Jerry Stuckle on 07/14/07 01:24

axlq wrote:
> In article <6usf9316qblqv2o9d4ae6547jr20iitqbk@4ax.com>,
> Michael Fesser <netizen@gmx.de> wrote:
>> .oO(Ciaran)
>>> Hi I've seen this a few places - The site lists off the number of
>>> people (not logged in) currently browsing the site. How can I do this
>>> with php / mySQL please?
>> You can use rand().
>>
>> Such "statistics" are never accurate. HTTP is a stateless protocol,
>> there's no such thing like a "currently online user". A user comes,
>> sends a request, gets a response and is gone. Next request, next user.
>
> The VBulletin software not only says how many users are logged in and
> using the forum, but also lists their names.
>
> It is reasonable to assume that for a site like a forum, if a user
> logs in, that user will probably still be looking at the forum a
> minute after the user's most recent activity. It should be easy to
> keep a running database of users whose recent activity is less than,
> say, 5 minutes ago. The list could be displayed alphabetically or
> sorted by timestamp.
>
> -A

No, that is not a reasonable assumption. Some people may stay 10
second, others 10 hours.

As Micha said - HTTP is a stateless protocol. All you really know is
that the user is *probably* still there when a response is being sent.
But even that is not for sure.

Any other figure is a pure crap shoot.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация