Script to check if a domain is banned from Adsense program or not

I want to create this kind of script for a long time a go, inspired by Digitalpoint Adsense sandbox tool. Since I have quite a free time now, I decided to do some little research on how to create an Adsense sandbox script. Supposedly to check whether a domain is banned from Google Adsense program or not. After a little research (trial and error), actually this kind of script is not so hard to implement (i.e. once you know the correct URL to call 😛 ).

So, here I create another PHP library that will check whether a domain (the domain name, not the user Adsense account)  is banned or not. Here’s the full library source code:

It’s a very basic PHP code without regular expression with a little cURL added. I’m sure you can improve it. 😀

How to use it:

The function will return an array of possible advertisers for the input URL. If the domain is banned, the function will return TRUE, if not banned, it will return an array.

Example array of advertisers result:

Fully working demo can be tested here: http://demo.ahowto.net/adsense_lib/
check if domain is banned by adsense

Close enough to Digitalpoint Adsense Sandbox tool.. 😛

Leave a comment ?

10 Comments.

  1. Hi thanks for sharing this. Can you please provide a few more details on how to put this on another site?

    Thanks for your time

    Johnny

  2. hi,

    Can you update code

    I need this code

    thanks

  3. Please share its tutorial.

  4. Hi, i know this is an old entry but i got to ask you 1 question… Normally when we make too much queries to google it kind of blocks the ip for about 30-45 mins or asks for captcha to see if a user is making the query and not a bot, is there same issue with http://pagead2.googlesyndication.com url? Does google block you

    • yes, the rules applied on all Google products. If you “asks” too many requests to one of google services within certain timeframe, you’ll get temporary block.
      One way to minimize this auto-blocking behavior is by having multiple-IP addresses in your server and proxifying your request to different IP.
      (PHP-cURL can do this)

  5. Hello
    What is the logic to work on the demo page form?
    I could not see the source code page as the post. I would be glad if you share all codes.

  6. Hi. I try to check my site http://www.shvaika.info/ and your script flashes that my site is banned. It is not true. Check own and you can see ADs on my site. Can you fix this issue? Note. Previously few directories from my site was banned. But only few directories not a full site.
    Thank you

  7. Please Share This Code php format

  8. Hello,
    How to trigger adsense code instead of manual advertiser? Please help for the same! I mean where to add ad slot id and stuff?

Leave a Reply

%d bloggers like this: