how can we get the no of hits of our site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

@The Phoenix, who should read it?

I can show you all numerous voting sites where the IP uniqueness is used to prevent abuses, if they decide that is right then it is right. I do not believe session based model will be useful for these sites. Of course sometimes they get abuses from people who change their IP but the IPs in the world are limited compared to the number of times a user can clear it's session.
User avatar
The Phoenix
Forum Contributor
Posts: 294
Joined: Fri Oct 06, 2006 8:12 pm

Post by The Phoenix »

miro_igov wrote:@The Phoenix, who should read it?
Anyone discussing web metrics. Measuring traffic, and how it relates to users and their behaviors, is full of misconceptions, inaccuracies, and flat out myths. I previously had a sig that read "IP addresses have no reliable relationship to users" specifically because it is an incredibly widespread misonception that there is a relationship. There isn't.
miro_igov wrote:I can show you all numerous voting sites where the IP uniqueness is used to prevent abuses, if they decide that is right then it is right. I do not believe session based model will be useful for these sites. Of course sometimes they get abuses from people who change their IP but the IPs in the world are limited compared to the number of times a user can clear it's session.
Its important to understand the language you are using in the second sentence: You are stating that IPs can be more reliable than sessions in determining user visits.

More reliable than not reliable at all isn't hard to accomplish. :)

You can measure requests. Anything relating that number to users, whether by IP, session, path in site, referrer, or browser type is completely unreliable.

As soon as you say "How many users...." you should stop, and say "We can't measure that reliably".

Read the site I linked, especially #4 on that page, to clarify why that is.
User avatar
The Phoenix
Forum Contributor
Posts: 294
Joined: Fri Oct 06, 2006 8:12 pm

Re: how can we get the no of hits of our site

Post by The Phoenix »

I realized that I went "meta" and didn't answer the OP question directly, so let me correct that:
djdon11 wrote:i want to know that how we can show the no. of visits of our sites
The number of visits (requests) for your site is relatively easy to do. Software like analog, or a counter, or any number of other solutions will get you that number.
djdon11 wrote: how many times our site has been visited by users
It sounds weird, but the number of visits has no relation to the number of times your site has been visited by users. It could be due to search engines, caches, proxies, and many many other causes.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

The Phoenix wrote:Please, PLEASE read Analog's explanation of how the web works. It tells you everything you need to know about what you can (and more importantly, what you cannot) reliably measure.

At best, you can reliably measure the number of requests. There are a huge number of tools for doing so (including analog), and numerous php based free/open solutions.

Hope that helps.
Yes, a few forums have had the sessions vs. IP address debates, and all of them concluded that the best way to try is to use both, but by no means should it be taken as accurate. Hit counting can be done accurately, but user counting cannot.
Post Reply