I haw active site for one day. Inside pages i haw this function
public function visit_update($link){
$query = mysql_query("UPDATE user SET visit = visit + 1 WHERE link = \"$link\" ");
}
Every user has a unique link. I haw one active user only, because of testing (page is currently in testing).
Last night for one active user it was counted 50 visits in database. Today i when i was checking it, it was 560 visits. I haw also a google analytic activated and there it was counting for that page 50 or so visits and 3 visitors , because I was testing in 3 different explorers.
The function dos not repeat it self , and only counting visitors that are not owners of the page. How is that possible ?
Update:
I went throe raw logs , and fount out two IP addresses (66.249.66.87 and 66.249.72.210) that was visiting my site all night and they are from google. How do I distinguish real web browsers from dummy like robots in PHP ? is that possible ?
You can detect crawlers by looking at the User Agent of the visiting browser most web crawlers indicate that they are a crawler. An example of crawler detection code can be found here.