tags:

views:

33

answers:

2

I have a blog aggregator with many contributing blogs. I would like to distribute a snippet of javascript that contributors could place on their blogs. After placement the javascript would load a link and image that would point to the aggregator -- very much the same way that Google Adsense works but on a simpler and smaller scale.

Can anyone provide or direct me to some sample code? Any help is much appreciated.

A: 

This should do it for you: http://www.winnershtriangle.com/w/Products.JavaScriptBannerAdRotator.asp

Jacob Nelson
+1  A: 

basic idea is to give your users

<script type="text/javascript" src="http://yourdomain.com/advert.js"&gt;&lt;/script&gt;

and inside your advert.js file you could have the link to your ads. this file can be generated using php as well. eg.

document.write('<a href="http://yourdomain.com"&gt;&lt;img src="http://yourdomain.com/ag.png" alt="advert" /></a>')
Fixtree