PDA

View Full Version : Rotating banner ad



kiko08
09-18-2006, 09:06 PM
i have this rotating banner ad. its working in my domain but when i use it in my subdomain its not working any more.

heres the code

<? include_once("http://badmintonx.org/adverts.php");
echo "<div align='center'>$bannerAd</div>";?>


<? $bannerCounter= 1;

//editable
$bannerCode[$bannerCounter] = "<A HREF=\"http://www.wowphilippines.com.ph\" target=\"_blank\">
<IMG SRC=\"http://badmintonx.org/images_ad/wow_phil.gif\" BORDER=\"0\" alt=\"WOW Philippines\"></A>";
$bannerCounter++;

$bannerCode[$bannerCounter] = "<a href=\"http://www.worldbadminton.com\" target=\"_blank\"> <img src=\"http://badmintonx.org/images_ad/worldbadminton.gif\" alt=\"www.worldbadminton.com\" border=\"0\"></a>";
$bannerCounter++;

$bannerCode[$bannerCounter] = "<a href=\"http://rccepz.net/TheVillage-Cavite\" target=\"_blank\"> <img src=\"http://badmintonx.org/images_ad/the_village.jpg\" alt=\"The Village\" border=\"0\"></a>";
$bannerCounter++;

//do not edit this

$bannerAdTotals = $bannerCounter - 1;
if($bannerAdTotals>1)
{
mt_srand((double)microtime() * 1234567);
$bannerPicked = mt_rand(1, $bannerAdTotals);
}
else
{
$bannerPicked = 1;
}
$bannerAd = $bannerCode[$bannerPicked];
?>