I am in the process of adding a counter to the index page of my website. I will start it at the number of counts since I opened the site. I can read monthly totals from my ftp site, but there are lots of values there. eg for one month last year these were the figures Total Hits 43147 Total Files 36424 Total Pages 16020 Total Visits 3458 Total KBytes 366433 Total Unique Sites 877 Total Unique URLs 1693 Total Unique Referrers 752 Total Unique User Agents 264 It is fairly obvious which I don't use, but which of these *do* I use. I'm guessing 'visits', but since it's called a hit counter, I did wonder.
Why would you want to do that? Nobody is interested in a hit count except you .. and you've already shown you know how to find them in your web logs. I think most web authors (other than probably rank amateurs) would agree that a hit counter is superfluous.
Indulge me. ) Once I learn how to do it, I will add one to another site where the owners want a counter to show them visitor numbers.
You don't need counters on the page, neither do the other guys. You can access the logs, some are more basic than others. Those servers (such as IIS,Apache which you didn't name) where you get full info like date/time, status codes, referers, url, domains, etc. Then you push the logs through tools like Analog, http://www.analog.cx/ Well you have a few issues, - getting values from the log example you showed to display on the page, some scripting required. It's NTL/exBY/VM you are on? So you need a script on your webserver to ftp, read, parse and display some unnecessary value on a page. - getting anything useful from a 1 + 1 + 1 .... hit counter. Look at a 3rd party counter if you really have to (sadly) have one. These are usually a line or 2 of code you paste into your page code with some sort of page id. www.google.com Results 1 - 10 of about 19,900,000 for free webpage counter .. (0.27 seconds) As to which value is important, that's the debate about counters. What are you counting? Again you could www.google.com and a bit of reading.... Results 1 - 10 of about 1,640,000 for web log total hits .. (0.25 seconds) You had all the keywords used in the above search in your post Description of the 'numbers' http://www.freetoasthost.org/docs/stats.html http://en.wikipedia.org/wiki/Web_analytics Then Results 1 - 10 of about 5,370,000 for weblog statistics .. (0.30 seconds) Me
I have a counter on one of my pages. It displays the result of this: $icounter = number_format(rand(1000000, 5000000)); and uses CSS to give the numbers a colorful display, in spans. It's about as useful as a real hit counter. Do note that if I am looking at your page, and hit Refresh numerous times, your count climbs. If this client of yours can't be talked out of it, at least use CSS to mark it as { display: none; } and tell them to read the source to see the numbers.
I can do that, but from what you say, there is no way that I can get a true count of visitors to mine or anybody's homepage. Ah well. I might just put it on my client's site and not disillusion them by telling them any details.