Monthly Archives: July 2012

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:
check if domain is banned by adsense

Close enough to Digitalpoint Adsense Sandbox tool.. 😛

Script to check the last date when bot is indexing your site

On previous post, I create PHP script to check how many pages from your site is indexed in search engine as part of fixing my old SEO statistic checker library. Now, we will check recent date where search engine bot indexing your site. We will use scraping technique again, so, we can save our Azure Datamarket quota. How’s this useful for you? Well, it measured how much love gave to your site.. 😛 bot query

Without more talk, here’s the full PHP source code:

Same as before, no fancy coding here. You can improve the data processing by using regular expression. You may ask, why we need to create our own file_get_contents as helper function, PHP already had one? You got it, we can use built-in file_get_contents function if we want. The reason why I create our own file_get_contents is to fool Search Engine that our query is legit and look natural (you know, we are doing illegal thing here –scraping search engine result– 👿 ). The other thing is that cURL has so many options that easily been set to our purpose (sure you can create stream context for built-in file_get_contents but is not that easy to understand to create it) .

How to use it:

Example result:

Fully working demo can be tested on: on “ Bot” section.
As you can see, bot is not really accurate. It only mention the date, Googlebot has more detailed info such as the time. Remember that the result might be different depending on your server location (where you run the script).

Downgrading ASUS Notebook BIOS

As I mentioned on my previous post about high CPU usage by audiodg.exe, I highly suspected that the culprit is because I upgrade my ASUS Notebook BIOS. So, here I’ll show you how to downgrade your Asus Notebook BIOS.

Asus Notebook has two way of upgrading/downgrading your BIOS. One way is using EasyFlash via BIOS boot screen and another way is using WinFlash utility. I’ll use WinFlash in this tips. Why? Because I can’t take BIOS boot menu screenshot 😛

WinFlash can be found on your Notebook CD driver companion or from Notebook Asus driver download page.

asus a43sv

Normally, WinFlash would not let you downgrade your BIOS. You’ll get warning and can’t click on “Flash” button. So, we need “unusual” way to start WinFlash utility

  • Make sure your Notebook battery is fully charged or connected to powerline.
  • Open Windows “Run” window by invoking Win+R. Type cmd there. It will open Windows command prompt.
windows run

run cmd

  • cd” to where you install WinFlash utility, usually on “C:\Program Files (x86)\ASUS\WinFlash
  • type this command: WinFlash.exe /nodate
  • See this screenshot for all above commands.
windows run asus winflash

How to run WinFlash via command line

  • The WinFlash window will be opened. Click OK
asus winflash from command line

WinFlash window opened via command line

asus winflash choose bios file

Choose downloaded BIOS file

  • You’ll still get warning about the BIOS you want to Flash is older than the currently installed. But, now you can click on “Flash” button.
asus winflash warning old BIOS

warning from WinFlash

  • Now click on “Flash” button. Flashing will start. After that, you can click on “Exit”. Windows will shutdown automatically.

There you have successfully downgraded your Asus Notebook BIOS!

Tested on: Windows 7 64bit, Notebook Asus A43SV, BIOS Revision 317 downgrading to Revision 314

audiodg.exe high cpu usage

This problem happened after I upgraded my ASUS A43SV BIOS. Suddenly, my Windows 7 is getting slower and slower when playing any sound (including Windows 7 system sound notification). Checking on Process Explorer, it is audiodg.exe that eat most of the CPU power and the Windows application that need to play sound. Even playing music with foobar2000 slow down Windows 7, not to mention when you are playing Youtube video using Firefox (Firefox + Flash + audiodg.exe = snail speed Windows).

windows normal audiodg.exe

normal audiodg.exe

(I can confirm it is BIOS problem because I do dual-boot and my Ubuntu also slowed down)

Of course I can downgrade my BIOS into recently working BIOS, but I’m looking for more “generic” solution.

So here it is:

  • right click on your “Speakers” on your Windows 7 tray icon
  • windows speakers right click menu

    right click on Speakers icon

  • Choose Playback Devices
  • New window will open. Double click on your playback device that has green checkmark
  • windows list of active sound playback devices

    Default playback devices. Double click it.

  • Choose “Enhancements” tab
  • click on “Disable all sound effects
  • windows playback devices disable enhancements

    Disable all sound enhancement

  • Click OK
  • reboot your Windows 7 (I don’t know if this last step necessary or not)

Tested on: Windows 7 64bit, ASUS A43SV, official BIOS version K43SVAS.317

If this trick doesn’t work, you can always easily downgrade the BIOS using WinFlash utility from ASUS.

Script to check how many pages from a site is indexed in

OK, this is part of what I’m doing to fix my old script (php pagerank checker and sh*t). I noticed that my indexed page checker and bot last access checker did not work anymore. It was because I’m not using API at all to get the data. Instead, I do  some simple scraping on search result page. (So, I’m not calling any Azure Datamarket API here)

Without more a do, this is the full PHP script code:

No fancy and advanced code there, just simple cut and grab. You might consider using regex when parsing the search results from

How to use it

The result would be in integer (0 if hasn’t indexed any of your site’s pages).

Fully working demo can be seen here: on “ Indexed” part.

bing indexed page in search result

this is how you check how many your site’s pages are indexed by

As you can see that the result may vary depending on your location (or where you put the script) and sometimes, gave invalid result (such as 0, where the real value might be higher than that)