banner rotation script
- From: "Nospam" <nospam@xxxxxxxx>
- Date: Sat, 15 Jul 2006 18:41:52 GMT
I am trying to get this banner rotation script to work but all I am seeing
are totally blank lines:
<?
$bannerCounter =1;
$bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site1\"
target=\"_top"><iframe src=\"http://www.example.com/site1\"
marginwidth=\"0\" marginheight=\"0\" width=\"120\" height=\"150\" border="0"
frameborder="0" style="border:none;" scrolling="no"> </iframe></a>\";
$bannerCounter++;
$bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site2\"
target=\"_top\"><img src=\"http://www.example.com/site2\" width=\"120\"
height=\"600\" alt=\"null\" border=\"0\"/></a> ";
$bannerCounter++;
$bannerCode[$bannerCounter] = "<a href=\"http://www.example.com/site3\"
target=\"_top\"><img src=\"www.example.com/site3\" width=\"468\"
height=\"60\" alt=\"site 3\" border=\"0\"/></a>";
$bannerCounter++;
$bannerCode[$bannerCounter] = "<a href=\"<a
href=\"http://www.example.com/site4\" target=\"_top\"><img
src=\"http://www.example.com/site4\" width=\"600\" height=\"500\"
alt=\"null\" border=\"0\"/></a>";
$bannerCounter++;
$bannerAdTotals = $bannerCounter - 1;
if($bannerAdTotals>1)
{
mt_srand((double)microtime() * 1234567);
$bannerPicked = mt_rand(1, $bannerAdTotals);
}
else
{
$bannerPicked = 1;
}
$bannerAd = $bannerCode[$bannerPicked];
?>
$bannerAd = str_replace('"', '\'', $bannerAd);
print("document.write(\"$bannerAd\")");
.
- Follow-Ups:
- Re: banner rotation script
- From: Krustov
- Re: banner rotation script
- Prev by Date: Re: tracking / help desk software (free)
- Next by Date: Re: banner rotation script
- Previous by thread: include in php
- Next by thread: Re: banner rotation script
- Index(es):