php xml banner rotator
Posted: Wed Nov 10, 2010 3:51 pm
Code: Select all
<?php
$Img1 = "http://www.thingamababy.com/images/buttons2.jpg";
$Alt1 = "[advertisement] (place your alt text here)";
$Url1 = "http://www. (the url of the link)";
$Img2 ="http://www.istockphoto.com/file_thumbview_approve/5525527/2/istockphoto_5525527-simple-shiny-buttons.jpg";
$Alt2 = "[advertisement] pro-dezign web development";
$Url2 = "http://www.pro-dezign.com/index.html";
$num = rand (1,2);
$Image = ${'Img'.$num};
$Alt = ${'Alt' .$num};
$URL = ${'Url'.$num};
Print "<a href=\"".$URL."\"><img src=\"".$Image."\" alt=\"".$Alt."\" /</a>";
?>
<meta http-equiv="refresh" content="5">