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

Posted by Hadron on 07/15/07 13:02

"rf" <rf@invalid.com> writes:

> "Hadron" <hadronquark@gmail.com> wrote in message
> news:87wsx234al.fsf@gmail.com...
>> Michael Fesser <netizen@gmx.de> writes:
>>
>>> .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.
>>>
>>> Micha
>>
>> So you clearly have no clue.
>
> Ha!
>
>> PHP maintains sessions and the user can be logged for that duration and
>> therefore only counted once.
>
> And it clearly says right up there in the Original Post: "not logged
> in".

So? Who is talking about "logged in"? I am talking about PHP sessions.

>
> That means no session.

Rubbish.

>
> And even if there *is* a session how do you know the user hasn't opened a
> new tab and is busily looking at somebody elses site, or turned their
> computer off, or simply wandered off down to the pub for lunch?

So what if they are? They are still connected and have a session. Of
course we can not know if that user is actually LOOKING - but they *ARE*
connected.

>
> With sessions you can tell how many people have used your login form and
> have yet to use your logout form, or yet to be timed out. You can not tell
> how many people are "browsing the site".

Yes you can. Because even if they are not physically looking, they ARE
still browsing. Sure, we dont know if the use is asleep or on the toilet
but he IS still maintaining a session.

>
> I administer several sites that use logins. Sometimes I visit one only to
> find that I had last "logged in" several days ago and my browser is still
> hanging on to the session cookie.

If you administer sites then I am surprised you are so clueless in the
context of a PHP site.

 

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

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