bpops Posted August 4, 2006 Share Posted August 4, 2006 I'm working on a counter from my site, and the problem I'm having is that the Google ads are checking my page and incrementing the counter.Is there a way to check if the requester is a bot/crawler or a user with a browser?I don't care what the browser is or anything like that, I just don't want bots counting on my counter.Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/16509-use-php-to-discern-usersbrowsers-from-botscrawlers-solved/ Share on other sites More sharing options...
trq Posted August 4, 2006 Share Posted August 4, 2006 You could try checking the $_SERVER['USER_AGENT'] variable. Link to comment https://forums.phpfreaks.com/topic/16509-use-php-to-discern-usersbrowsers-from-botscrawlers-solved/#findComment-68950 Share on other sites More sharing options...
bpops Posted August 4, 2006 Author Share Posted August 4, 2006 ok so I figured out that this variable returns "Mediapartners-Google/2.1" with Google Ads.. so I suppose I can just ignore all these requests. Thanks so much thorpe, and you too nethnet (from my other post). You guys have just made me very happy. I've spent hours upon hours this past week trying to figure out why my counter was incrementing more than I was hitting the pages, and now I know how to fix it!! :) Link to comment https://forums.phpfreaks.com/topic/16509-use-php-to-discern-usersbrowsers-from-botscrawlers-solved/#findComment-68959 Share on other sites More sharing options...
nethnet Posted August 4, 2006 Share Posted August 4, 2006 I'm glad I could help (at least with the first part) :) Link to comment https://forums.phpfreaks.com/topic/16509-use-php-to-discern-usersbrowsers-from-botscrawlers-solved/#findComment-68961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.