Random Ad Rotator

Random Ad is a simple PHP ad rotator. It reads a file which contain the ads’ HTML code on your site and pick one randomly. No Database is needed. To use it, just include a small piece of HTML code in your pages!

Usage Guide

The package consists of 3 files: randomad.php, ads.txt, sample.html.

To run a quick test:
you can put all of the above files in the same directory on your server. Then visit the file sample.html. Try to reload the sample.html page a few time. You should see different ads appears randomly.

To make it work for your own site:

1) upload the files: randomad.php and ads.txt to your server.
2) put your ads’ HTML code into the file “ads.txt”. Each line per ad.
3) copy and paste the following code (as in sample.html) into your web pages:

” <iframe marginwidth=”0″ marginheight=”0″ width=”468″ height=”60″ scrolling=”no” frameborder=0 src=”randomad.php”> </iframe> ”

– you may need to adjust the size of the iframe to fit your own use. (Tips: you can set the size to the largest one of your ads. and put a <center> </center> tag around each ads in the ads.txt file)
– if you put the randomad.php in different directory, please adjust the “src=” parameter accordingly.

Source: flash-here.com

Leave a Comment