As a Google Adsense Publisher, you may want to check your earnings
report N times a day, with this simple CFML, you can get
real-time result without log onto the AdSense.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>GAS Downloadable Report Auto Retriever (V1.1.1b)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> <!-- .styf1 { font-size: 12px; color: 666666; font-family: Verdana, Arial, Helvetica, sans-serif; } --> </style> </head> <body> <!--- Input username below ---> <cfset strYourEmailAddress="REPLACE WITH YOUR EMAIL ADDRESS"> <!--- Input password below ---> <cfset strYourPassword="REPLACE WITH YOUR Password"> <!--- Select one or input one you want to retrieve (by URL.strTimePeriod or Form.strTimePeriod) <cfset strTimePeriod="alltime"> <cfset strTimePeriod="today"> <cfset strTimePeriod="yesterday"> <cfset strTimePeriod="last7days"> <cfset strTimePeriod="lastmonth"> ---> <cfset strTimePeriod="thismonth">
<cfset strGasURLstart="https://www.google.com/adsense/reports-aggregate?timeperiod=simple&timeperiod.simpletimeperiod="> <cfset strGasURLend="&reportType=property&groupByPref=date&null=Display+Report&csv=true"> <!--- The URL to be retrieved ---> <cfset strGasURL= strGasURLstart & strTimePeriod & strGasURLend> <!--- Your userAgent ---> <cfset strUserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"> <cfhttp url = "https://www.google.com/adsense/login.do" method = "post" userAgent = "#strUserAgent#" > <cfhttpparam type="FORMFIELD" name="destination" value=""> <cfhttpparam type="FORMFIELD" name="username" value="#strYourEmailAddress#"> <cfhttpparam type="FORMFIELD" name="password" value="#strYourPassword#"> <cfhttpparam type="FORMFIELD" name="null" value="Login"> </cfhttp> <cfset pos1=find("?s=","#cfhttp.fileContent#",1)> <cfif pos1> <cfset pos2=find("&","#cfhttp.fileContent#",pos1)> <cfset strS=mid("#cfhttp.fileContent#",pos1+3,pos2-pos1-3)> <cfif len(strS) EQ 11> <cfset strGasURL= strGasURLstart & strTimePeriod & strGasURLend & "&s=#strS#"> <cfoutput>URL:#strGasURL#</cfoutput> <cfhttp url="#strGasURL#" method="get" userAgent="#strUserAgent#" name="ryGASreport"></cfhttp> <cfoutput><pre>#cfhttp.fileContent#</pre></cfoutput> <cfelse> No data available. Try at least 1 hour Later.... </cfif> <cfelse> No data available. Try at least 1 hour Later.... </cfif> |
This FREE Script Brought to you by DiamondsChina.com
Updated Mar 19, 2004 v1.1.1b
The Adsense Downloadable Report Auto Retriever
Script is currently
listed and/or recommended by following websites:
WebmasterWorld (members only)
http://www.webmasterworld.com/forum89/1986.htm
HotScripts
http://www.hotscripts.com/Detailed/32785.html
Macromedia Coldfusion Exchange
http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn131&extID=1013422
LBB.org (French only)
http://www.lbb.org/cgi-bin/script/detail.cgi?ID=6009
The New World Web Development
http://webdevelopment.the-new-world.com/index.php?main=detail&id=26168
Source Code in CFML:
http://www.DiamondsChina.com/blog/20040319_AdSense.html
Ongoing Improvements
Adsense Downloadable Report Auto Retriever v2.0a+ - Use <cfmail> + <cfschedule>, to send the Report every 2 or 3 hours to user, by email, FAX, SMS.
- If use database, it also can send updated Report on desirable threshold, say by earnings, clicks, impression, channels, display locations (coupled with Tracking Scripts).
 |
MSN® Messenger's alter window pop-up your earnings today so far... (Hypothetical Data only, per AdSense TOS) |
No ColdFusion or New to ColdFusion? -- No problem, click here to learn more and try it for FREE. I'm not a programmer, nor CS major, so you can do it too!
GoogleTM is a trademark of Google Inc. Google AdSense is for web publishers who want to make more revenue from advertising on their site while maintaining editorial quality. AdSense delivers text-based Google AdWords ads that are relevant to what your readers see on your pages and Google pays you. What is Google AdSense?
Coldfusion® and Macromedia® are trademarks of Macromedia, Inc. MSN® is a trademark of Microsoft® Corp.
Unlike other articles on our website, this page may be reproduced in whole or in part provided that the reproduction includes a credit of authorship to "Zhenghua Zhuang", plus a crawlable link to either http://DiamondsChina.com/ or to the original article on this site.