PDA

View Full Version : find out how many visitors for a website


kamkam
11-21-2008, 01:59 AM
Hi;
i'd like to ask how to count how many visitor come to my website ?

For example;
i got a table called visitors_table, it got some attributes like visitor_ip, visitor_date,id...
and in the visitor_date 2008-11-20, there are some visitors come to my page
2008-11-20 10:00:00 58.96.75.130
2008-11-20 10:00:30 58.96.75.130
2008-11-20 10:01:30 61.135.168.39
2008-11-20 10:21:30 61.135.168.39
2008-11-20 10:21:31 67.195.37.186

then i said in the date of 20, there are 3 visitors come to my website

and in the 2008-11-21,there are some visitors come to my page
2008-11-21 10:00:00 58.96.75.130
2008-11-21 10:00:30 58.96.75.130
2008-11-21 10:01:30 61.135.168.39
2008-11-21 10:21:30 61.135.168.39
2008-11-21 10:21:31 67.195.37.200



then i said in the date of 21, there are 3 visitors come to my website

and finnaly, i said in two days of the 20 and 21, there are 6 visitors come to my website

and i use the following query, i just got 5 visitors, i could not get 6 visitors from the following query, could you tell why?
SELECT count(distinct visitor_ip) FROM `visitors_table` where visitor_date>="2008-11-20"

kamkam
11-21-2008, 11:36 AM
thanks, i know how to do now

brazenskies
11-21-2008, 11:44 AM
I wouldn't bother with mysql for this.

Do you have your own dedicated server or is it hosted somewhere that allows you to access through a control panel?

If it's the latter then there will be webstats software that analyze the server's log files.

If it's the former then I would recommend using AWstats. Pretty simple to set up and gives accurate info, again based on server logs!