Trust me, it won't work. No amount of PHP/Ajax/anything will work.
The only way to fake clicks like this is to have a program people install and it does it through that.
Think about it. First, you have to parse the webpage that is being requested (the homepage). you then have to find the IFRAME which holds the link and parse this to get the links as it's called by JS, not any HTML, so you *cannot* parse it all in one go.
This means you're requesting something twice with a same ID/timestamp (the JS isn't running as it's client side, and you're requesting something from the server). Huge redflag no matter what.
Yes, you can do it with XPATH/DOM parsing. It's easy, but no matter how you do it, g00gle will catch on.
If you were the worlds fastest growing business, in the world, ever, would you not hire the best minds in the world to protect your most profitable income stream? i'm sure you would.
Save your time, do more SEO or make a macro to click the link and promote that.
Think of g00gles adsense as a CAPTCHA. What people here are trying to do is request the CAPTCHA to get the link of it, then use the link of it to download it. You've downloaded it twice (initial request & the download). If you had a website where every single user requested everything twice (looking through g00gles eyes), you'd get suspicious too.
Hope this clears things up!