AdMob Stats Script
This script will create a logged in session on the admob.com website and return the advertising spend balance, the advertising earnings balance and the number of ads which are pending.
Now you can build your own mobile site so you can login to admob.com from wherever you are. The version I’m running executes at 9am each morning and sends a text message to my phone with the results.
This script is depending on the layout of the HTML elements wrapped around values not changing, if admob.com change the HTML layout of the sections of the page where this script harvests the data from it will fail.
I’ll try to keep up to date with this and the latest release will always be available from this page.
Usage. Configure the $admob_email and $admob_pword to reflect your admob.com login details, upload admob-stats.php and admob-cookie.txt to your web space and chmod admob-cookie.txt so that it’s writeable by your server. Then call it, authenticate and it should be able to do the rest on it’s own.
For this to run you’ll need PHP with CURL enabled, I’ve read online that CURL on PHP 5+ may have problems with the cookie handling but I’ve no personal need to work around this, if you’re running PHP 5 and find a solution please share and I’ll credit you on the site for your contribution.
August 11th, 2007 at 3:20 am
From a couple of days ago you need to change the action and referer values to http://www.admob.com/s/home/login/login as AdMob have rolled out some cool changes to their interface and a few URLs have changed.
April 23rd, 2008 at 7:32 am
hello andy,
this script dont work even on php4, and edited the login referer etc.
April 23rd, 2008 at 4:32 pm
Well they made more changes to their site and I’ve been too busy to get around to working them out and adding them to the script so it works again.
If you work it out please let us know…….