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

Posted by Gordon Burditt on 07/16/07 03:59

>Sorry if I have not read the whole topic and this hasn't been answered
>before, but here is my technique. It's rather a simple hack.

Please explain what the result *MEANS*. Pretend that you are in
court trying to explain why the numbers your employer got from this
are not fraudulent and not grossly misleading. It is not uncommon
to want such numbers for something relating to advertising and
billing therefor.

>On a page, I would simply register the IP address and the current time
>that the page was pinged in a mysql database.

There is no such operation as "pinging a page". You probably mean
"a request for the page was made with the HTTP protocol". You also
need to decide how to count these: one page from the point of view
of the user can involve multiple requests for the page, images,
frames, etc. that make for a lot of multiple counting. If you are
mostly interested in the last time the requests came in, though, that
bunch of requests usually come close together.

There are many known problems with using an IP address as an
identifier. A large number of AOL customers can appear to have the
same IP address. So can entire offices behind a NAT gateway or
proxy. Also, it is possible for a *single* customer to fetch
portions of the page (images, etc.) with what appears to be different
IP addresses due to load-balanced proxys.

>Then whenever somebody
>viewed a page, it would check for any records in that database within
>so many seconds. If it was within that range, it would say this person
>was online.

Please describe how you determine "so many seconds", and why it
shouldn't be 20% higher or 20% lower.

>So you would simply have to just give the total number of
>records.

And this number means *what* when "so many seconds" is 1? And when
"so many seconds" is 7 years?

>As for the HTTP stuff, I seriously don't think it is very related,
>this is a practical question, not theory.

HTTP requests are what make the web work. If you want to come up
with some statistics about how loaded your web server is, you might
want to track how often you get requests for a page or image ("hit").
These, at least, are fairly easy to count. How you translate that
into user counts is *much* more iffy.

 

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

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