I want to avoid counting robots who visit my site.
The existing script does this
$agent=$_SERVER['HTTP_USER_AGENT'];
//echo "$agent<br>";
if (!(eregi("bot",$agent)||eregi("pompos",$agent)||eregi("Yahoo",$agent)||eregi("quepasa",$agent)))
{
counting code
}
Each time I detect an aggressive robot I have to add it to the list above. This means modifying 10 or more pages.
Is there a simpler way to do this? I can't put the entire counting code in a file and include it because the counting code is different for each page.