On: 2005/10/07 Viewed: 36514 times

This is a rather simple script that will create an RSS feed with your daily Adsense earnings, making it easy to track them via your regular feed reader.

Current version: 1.1 (24 april 2006)

Features

Multiply your income by 10 ! Become a 6 figure blogger ! No, just kidding :) There are no feature this time, except that you can specify how many feed items (i.e. days) you want to have.

Download

Get the script :

  • rss-adsense.php (colorized html, copy & paste into a blank file but don’t download it : it’s colorized html, not code :)
  • rss-adsense.txt (right click & save as .php)

Configure

Edit the script, and modify 4 lines at its beginning to suit your needs. Basically, you have to enter your Adsense login, password, the range of days you want to aggregate and a path to a temporary cookie file you shouldn’t even need to modify.

Upload

Upload the script to some secret location on your server, or rename it to some secret filename. Why secret ? Just because you don’t want anybody to see how much (or how few) you earn, and also because it is against Adsense Terms of Use to publicly display your Adsense results.

If you add it on a web-based RSS reader (Bloglines for example), be sure to mark it private.

FAQ

Q: Is it secure to enter my Adsense password in a script ?
A: It is, as long as no one can access the source of the script on your server (i.e. download the source file via FTP for example)

Q: Is it a malicious script that will send my password to you ?
A: Well of course. It will also guess your credit card number and post it on random forums all over the internet.

Q: What does Google think about this ?
A: They don’t care. Read the disclaimer below.

Q: What does the author of PHP Curl extension think about this ?
A: He thinks it’s way cool.

Disclaimer

Adsense Terms of Use regarding disclosure of your earnings vary from time to time. As of today, you cannot publicly reveal your daily income, Click Through Ratios and eCPM. If anyone else ever discovers and reads your feed, it will be your fault. Not mine :)

Adsense reports are not update real time, so there is no need to refresh your feed every 5 minutes. Set up a reasonnable refresh delay such as one hour minimum in your feed reader.

Release history

  • 10/05/2005 : 1.0, initial release
  • 04/24/2006 : 1.1, update by Chris Gibson when Google changed their query parameters. Thanks Chris !

Related posts

Metastuff

This page "Adsense Earnings RSS Feed" was posted on 07/10/2005 at 1:13 pm
Watch this discussion : Comments RSS 2.0. You can trackback this post from your own site

53 Blablas

    Pages: [1] 2 3 » Show All

  1. 1
    sams weblog » Blog Archive »... Switzerland »
    pingback on 13/Oct/05 at 1:12 pm # :

    [...] Das Script kann man hier herunterladen. Technorati Tags: [...]

  2. 2
    Will Europe »
    commented, on 13/Oct/05 at 2:11 pm # :

    Hi,

    I get the following error:
    Fatal error: Call to undefined function: curl_init() in /home/[...]/rss-adsense.php on line 60

    Is this to do with my web host’s php setup?

  3. 3
    Ozh France »
    said, on 13/Oct/05 at 4:19 pm # :

    Will » yes, you need a PHP installation with curl. It’s really pretty standard, ask for it or change host :)

  4. 4
    Jon Canada »
    commented, on 13/Oct/05 at 6:02 pm # :

    Thanks so much for this script.

    I’d really like to be able to view earnings by channel. Before I try to hack your script, can you give me some pointers on what I might want to try? Or why I might not want to try it? Or can I convince you to add that feature?

    :)

    Thanks!

    Jon

  5. 5
    Ozh France »
    wrote, on 13/Oct/05 at 6:25 pm # :

    No, I won’t make it :)
    I just wanted to have a quick recap I can follow through the day, but for detailed stats I just to the adsense site

  6. 6
    michelem Italy »
    thought, on 13/Oct/05 at 6:54 pm # :

    It’s a very useful script, thanks.
    You could add a note like “it requires php-curl package” (php4-curl for Debian users)
    Nice work

  7. 7
    Adsense Earnings RSS Feed script Italy »
    pingback on 13/Oct/05 at 7:16 pm # :

    [...] Ho scoperto una cosa molto utile per chi utilizza e cerca di guadagnare qualcosa con i Google Adsense, Ozh ha creato uno script (php, richiede php-curl) per ottenere la lista degli ultimi guadagni in formato feed RSS. Basta copiarsi il file metterlo in qualche posto al sicuro in un vostro spazio online (magari aggiungendo anche un file robots.txt che escluda l’indicizzazione di quel file) e aggiungere l’url al vostro aggregatore preferito, ma se usate un aggregatore online (come Bloglines per es.) ricordatevi di mettere il feed “privato”! (e’ assolutamente vietato da regolamento pubblicare i proprio guadagni). Semplice e utile. –> [...]

  8. 8
    Jon Canada »
    said, on 13/Oct/05 at 7:22 pm # :

    Ozh: OK, I don’t blame you for not wanting to make it :)

    I’m *ok* with PHP, but certainly not a master. Can you give me a clue on where I would want to massage this script to show data by channel?

    I’ve tried the ‘&type=channel&c.id=34656456′, but this just breaks the feed…

    I made that adsense channel id up, for the record.

    Any clue would be appreciated.

    Thanks!

  9. 9
    cosa Indonesia »
    commented, on 14/Oct/05 at 7:31 pm # :

    downloaded, nice script :)

    too bad it won’t make me a six figure blogger. I hope you add that feature in the next version!

  10. 10
    վ³¤ȕ־ » Google Ads... United States »
    pingback on 16/Dec/05 at 7:25 pm # :

    [...] Adsense to RSS Version http://planetOzh.com */ [...]

  11. 11
    RSS SCRIPT » RSS Tool Talk : RSS S... United States »
    pingback on 31/Jan/06 at 7:00 pm # :

    [...] Adsense Earnings RSS Feed « planetOzhThis is a rather simple script that will create an RSS feed with your daily Adsense earnings, making it easy to track them via your regular feed reader. … [...]

  12. 12
    RSS SCRIPT » JavaScript RSS Box Vi... United States »
    pingback on 05/Feb/06 at 3:01 am # :

    [...] Adsense Earnings RSS Feed « planetOzh This is a rather simple script that will create an RSS feed with your daily Adsense earnings, making it easy to track them via your regular feed reader. … [...]

  13. 13
    RSS SCRIPT » Adsense Earnings RSS ... United States »
    pingback on 08/Feb/06 at 2:01 pm # :

    [...] Adsense Earnings RSS Feed ” planetOzh … This is a rather simple script that will create an RSS feed with your daily Adsense earnings, making … PHP libcurl Featuring my Adsense to RSS Script. Adsense Earnings RSS Feed … [...]

  14. 14
    RSS SCRIPT » Adsense Earnings RSS ... United States »
    pingback on 10/Feb/06 at 7:00 am # :

    [...] Adsense Earnings RSS Feed « planetOzhAdsense Earnings RSS Feed « planetOzhThis is a rather simple script that … RSS SCRIPT » JavaScript RSS Box Viewer 1.0RC: […] Adsense Earnings RSS Feed. … [...]

  15. 15
    PurpleRain Malaysia »
    said, on 25/Apr/06 at 8:15 am # :

    $cellpadding=0 (//–> clicks on pages : CTR = - eCPM =

    It says xml error, expect

    What’s wrong with it?

    Thx.

  16. 16
    Will United States »
    wrote, on 30/Apr/06 at 7:41 am # :

    Yeah same here. :(

    XML Parsing Error: mismatched tag. Expected: . Location: rss-adsense.php Line Number 173, Column 63:$cellpadding=0 (//–> clicks on pages : CTR = - eCPM =

    ————————————————————–^

  17. 17
    PurpleRain Malaysia »
    wrote, on 11/May/06 at 7:13 am # :

    I am still waiting for yr assistance. Can i have a hand here? Thanks.

  18. 18
    Dx Argentina »
    said, on 25/Jul/06 at 8:45 am # :

    teh script is borked…
    <title>$</script> on </title>

    and many things like this…

    No, no, no… login incorrect

    This helped me in debugging, find this:


    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
    curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
    curl_setopt ($ch, CURLOPT_POST, 1);
    $result = curl_exec ($ch);
    curl_close($ch);

    $result=preg_split("/\n/",$result);
    array_pop($result);
    array_pop($result);
    array_shift($result);
    $result = array_reverse($result);

    And add in that whitespace after curl_close this:
    die($result);
    You will see roughly the result of.. login?

  19. 19
    Fabian Argentina »
    commented, on 03/Aug/06 at 12:38 pm # :

    Great script! thanks

  20. 20
    Michael Dayah Jordan »
    replied, on 05/Aug/06 at 1:15 pm # :

    I noticed in my own feed, the date for the first entry showed up fine, but the subsequent were appearing as from the year 2036. Upon inspection, I found the date was being put in the wrong order.

    Changing
    $day = mktime(0, 0, 0, $day[1], $day[0], $day[2]);
    to
    $day = mktime(0, 0, 0, $day[1], $day[2], $day[0]);
    fixes the problem.

Pages: [1] 2 3 » Show All

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Close
E-mail It