PHP Code:
<?php
$banners = array();
$urls = array();
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// To add or subtract banners you must make a new/delete an entry in this file. Each record
// has two parts, the banner and url. put in the full path to the image in the banner line,
// and the full url of the link in the url line. The numbers in the records MUST stary at 0
// and have to be in order, you cannot skip a number or a "blank" banner will show up.
//
// To show this script on a page include to following code:
// <SCRIPT LANGUAGE="JAVASCRIPT" SRC="http://www.yoursite.com/ads/banner.php?show"></SCRIPT>
//
// but replace the url with the path to where you uploaded the banner.php file, "?show" must
// remain apended to the name for it to load inside your current page.
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$banners[0] = "http://www.gettipsy.com/banner.gif";
$urls[0] = "http://www.gettipsy.com";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Do NOT change anything below this line
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$run = getenv(QUERY_STRING);
srand((double)microtime()*1000000);
$randval = rand(0,count($banners)-1);
if($run hahahaha 'show') { echo "document.write(\"<a href=".$urls[$randval]." target=_new><img src=".$banners[$randval]." border=0></a>\");"; }
else { echo "<a href=".$urls[$randval]." target=_new><img src=".$banners[$randval]." border=0></a>"; }
?>
to add more banners, simply copy the first one and replce [0] w/ [1] and so on down the line...