Hi, I want to count the unique views for a page. I complete most of the part. Now my problem is it should not consider any robots, spammer. Because It should be count only users not any other crawling. How can I do it.
you can get user agents of bots and exclude them.. and what do you mean by spammers? you cannot detect spammers its impossible
and spammers don't use OS to send their stuff? mate you are asking somthing impossible to do.. all you can do is to record unique IPs then exclude bots IPs from the list.. that's it.
Have a script insert the IP of the visitor into a table, but checks if it already exists before inserting. Of you could just store all IPs and "SELECT DISTINCT"
You could insert all unique IP's into a table. So before insertion, just check the database to see if the IP has already been inserted, and then to display use SELECT * FROM ip and then use mysql_num_rows() to count the number of IP's that you have in the table
Yes, all you can do is saving unique IPs in your database, then delete bots ip About spammers, the only way I think you can use, is to check how many pages he oppens in some very little time. What I mean is that if the spammer opens 10 in 2 sec (using a script for example), you can get it. BUt if he opens only one page you will never get it