You are here: banner rotation script « All PHP « IT news, forums, messages
banner rotation script

Posted by Nospam on 07/15/06 18:41

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\")");

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация