Jump to content

Use PHP to discern users(browsers) from bots/crawlers? **SOLVED**


bpops

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.