|
If you used ASP.NET, it would be if(noCountList.Contains(userAgent)) { ; } else { ; }. If PHP is a decent language like everyone says, you can do the same thing with slightly different syntax. If not, you can make a for loop to run through every item in the array until you find a match or hit the end. That's slow, but if you only have a few in the list it won't matter so much.
You might be better off counting hits from known browsers and excluding everything else? You could use a Regular Expression so as not to have to hard code every different version, but that protects you when Yahoo renames their bot, or Joe Blow makes one and runs it on your site.
|