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://graybit.com/" title="Convert a site to grayscale to test contrast">
<img src="images/grbt.jpg" width="468" height="60" alt="GrayBit.com: Experience Color Wearing Shades of Gray" /></a>
GrayBit.com: Experience Color Wearing Shades of Gray

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