Forum Moderators: martinibuster

Message Too Old, No Replies

Getting ad's image url

         

huesv

9:23 pm on Dec 15, 2008 (gmt 0)

10+ Year Member



Does anyone know how to programatically get the url of the image that's returned by AdSense's javascript that one inserts into a page to include image ads?

For instance, AdSense has you paste-in something similar to this in your html:


<script type="text/javascript"><!--
google_ad_client = "pub-1234";
google_ad_slot = "0987";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

That code returns an image, with a source url ... and I want that source url. The same as if I looked at the page in my browser and right-clicked to get the image source. I want to get the url programatically. Thanks!

huesv

9:53 pm on Dec 15, 2008 (gmt 0)

10+ Year Member



Oops, I want to do this from a Perl CGI. ... actually maybe this question would be better for the Perl board?

huesv

10:10 pm on Dec 15, 2008 (gmt 0)

10+ Year Member



I guess it'd be better if I could use a set of javascript parameters to the .js if anyone knew how to construct the URL. Some here might know that. Anyone?

huesv

10:29 pm on Dec 15, 2008 (gmt 0)