Why not do this :
in your code :
PHP Code:
<?php
$img= array();
$img[] = "banner1.gif";
$img[] = "banner2.gif";
$img[] = "banner3.gif";
$img[] = "banner4.gif";
$img[] = "banner5.gif";
$img[] = "banner6.gif";
$img[] = "banner7.gif";
$img[] = "banner8.gif";
$img[] = "banner9.gif";
$dir = "http://dev.animationation.net/images/banners/";
$rand = rand(0, count($img) - 1);
$img = $img["$rand"];
$path = "<img src=\"".$dir.$img."\">";
?>
The above is the banner.php file.
Then use an include in your main page you want to show the banner in :
PHP Code:
include('./banner.php');
and place :
whereever u want it to show.