I need a script that performs this task:

I want a script in PHP/MySQL or AJAX, that reads the Ad Block of Google Adsense and finds out link, so that they can be used in another portion of the page. Read Details if not clear.

I have a site, for which Google adsense is configured.
I have a page on my site, showlinks.php
Adsense code is prewritten on the page. Hence, the page contains google adsense ad blocks during runtime.
The code is written inside a hidden layer (or may be a visible one). I think it's clear to one, who knows HTML and Javascript.
An AJAX or PHP script, written in the existing page, reads the content of the Adsense Block during runtime.
The script fetches the links from the HTML content of the block.
The script creates custom links on a visible layer of the existing page. Custom links look like this : http://mysite.com/traceClick.php?user=username&googleAdLink=Fetched_Adsense_Link
What happens when a registered user clicks this link:- The username of the user is traced in traceClick.php file, as well as, the users browser is redirected to the adsense link that comes as a GET variable Fetched_Adsense_Link
What you'll do: Just write the code for showlinks.php, traceClick.php will be written by us.

Another suggestion:
You can use HTML Frames also, inspite of hidden layers. But, I need to trace - who clicked those adsense links on my site (which user).
The logic is upto you, if you invent something different from the above one.

IF THERE IS SOMEONE WHO CAN DO THIS, I WILL PAY HIM.

This question is asked in my personal blog also (link Sribasu.info) . I'LL BE GRATEFUL TO THE EXPERT WHO CAN HELP ME GIVING THE CODE.

It is definitely a violation to google adsense's terms and condition.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.