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://green-beast.com/" title="Have a web site or blog built today!">
<img src="images/gbdc.jpg" width="468" height="60" alt="Green-Beast.com: Accessible Standards-Compliant Web Development" /></a>
Green-Beast.com: Accessible Standards-Compliant Web Development

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