<?php
//Random Image Generator
//By Joe Tito ([email protected])
//DesignersPark.com
//*****How to work the script*******
//The <div style="text-align:center;"> tag aligns your image to the middle of the page. It can be changed to "left" or "right" if you wish to change the alignment of the image
//Fill the <a href="...."> field in with the location you want the image to link to
//Fill out the <img src="...."> field with the path to the image that you want to display
//Fill in the alt="...." with the text that you wanted to popup when you scroll over the image
//Replace the "3" with the total number of ads that you have to rotate
$numbanners=3;
srand((double)microtime()*1000000);
$ad = rand(1,$numbanners);
switch($ad) {
case 1:
echo'<div style="text-align:center;"><a href="http://www.google.com"><img src="http://www.designerspark.com/images/colourburst/finaltwotone.jpg" style="border:1px solid #000000;text-decoration:none;" alt="The text that will popup when you scroll over the image"></a></div>';
break;
case 2:
echo'<div style="text-align:center;"><a href="http://www.yoursite.com/images/imagename.jpg"><img src="http://www.designerspark.com/images/colourburst/afterblur.jpg" style="border:1px solid #000000;text-decoration:none;" alt="The text that will popup when you scroll over the image"></a></div>';
break;
case 3:
echo'<div style="text-align:center;"><a href="http://www.yoursite.com/images/imagename.jpg"><img src="http://www.designerspark.com/images/colourburst/final.jpg" style="border:1px solid #000000;text-decoration:none;" alt="The text that will popup when you scroll over the image"></a></div>';
break;
}
//Please do not remove the following code from this script. Since we offer these scripts to you for free, we would appreciate
//you advertising where you got the script.
echo('<div style="text-align:center;margin-top:10px;">
<a href="http://www.designerspark.com"><img style="border:1px solid #000000;text-decoration:none;" src="http://www.designerspark.com/images/button1.png" /></a>
</div>');
?>