it outputs the image but it doesnt change the image unless i visit the script directly.
my current code is:
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";
$img[] = "banner10.gif";
$dir = "http://dev.animationation.net/images/banners/";
$rand = mt_rand(0, count($img));
$randimg = $dir;
$randimg .= $img["$rand"];
header('Content-type: image/gif');
header('Location: '.$randimg.'');
?>