| Resistance is Futile Name: Mitchell Location: Calgary, Canada Join Date: Apr 2006
Posts: 1,085
NP$: 1852.05 ( Donate)
| That's a pretty useful script, I'll use it everywhere!
Added Random Ad Sizes. PHP Code: <?php
srand( microtime() * 1000000);
$advertise = rand(1,3);
//After the rand decided how many youve got and the first and last number e.g got 3, 1,3
switch($advertise)
//you can add more just use the same format
{
case 1 : $banner="site 1 image url"; $url="site one address"; $imgwidth="88"; $imgheight="31"; break;
case 2 : $banner="site 2 image url"; $url="site two address"; $imgwidth="50"; $imgheight="50"; break;
case 3 : $banner="site 3 image url"; $url="site 3 address"; $imgwidth="468"; $imgheight="60"; break;
}
$display = "<a href=\"$url\" target=\"_blank\"> ";
$display.= "<img src=\"$banner\" ";
$display.= "width=\"$imgwidth\" height=\"$imgheight\" border=\"0\" >";
$display.="</a>";
echo($display);
?> |