Mike’s Experiments - PHP: Ad Generator

If you have a large number of sponsors for your web site but have little real estate for their ads, or you simply wish to not inundate your site’s visitors with a large number of ads, this script will offer some random ad renderings in a given location offering some ad diversity.
Get the PHP, source. Go to back to the Mike’s Experiments index.


Sponsors Ad Infinitum!

To see how this ad generator works, reload this page. Some ads will appear consecutively; it’s purely random. Below is the output so you can see what’s being produced. See legend below.

<a href="http://www.greenmethods.com/" title="Learn about biocontrol and IPM">
<img src="images/gmdc.jpg" width="468" height="60" alt="GreenMethods.com: Good Bugs Rule!" /></a>
GreenMethods.com: Good Bugs Rule!

Colors Legend: Mark-up in Blue is the link, Red is the image, and Green is the dynamic output.