Hi,
I'm trying to determine why a simple script to randomly load one of 5 flash banners seems to be repeating the same banner on the ie 5 and netscape 4.75, Macintosh platform.
I've inserted meta tags to prevent browser caching ('<META HTTP-EQUIV="expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">)
The script itself, which constructs an array and then chooses a random element to write into the source tag, reads as follows:
<?php
$flash = array("flashbanners/morphbanner1","flashbanners/morphbanner2","flashbanners/morphbanner3","flashbanners/morphbanner4","flashbanners/morphbanner5");
$random = rand(0,4);
$banner = $flash[$random];
echo "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='630' height='104'>";
echo "<param name=quality value='high'>";
echo "<param name=movie value='$banner'>";
echo "<embed src='$banner' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='630' height='104' bgcolor='#f5f5dc'>";
echo "</embed>";
echo "</object>";
unset($flash);
unset($random);
unset($banner);
?>
The strange thing is that the script seems to do a reasonable job of loading random banners every 2 or 3 refreshes on i.e. 5 and netscape 6 on a pc platform on my off-campus internet connection.
Am I doing all that I reasonably can in my code to make the flash banner source tags random?
Thanks in advance for any help