Using Image Rotator multiple times doesn't change picture
Posted: Mon Jan 23, 2006 9:34 pm
I can't use any php image rotators to show different random images in my pages. Every time the script is called it always brings back the same picture instead of a different picture. There are plenty image files so it's no coincidence. If anyone has an idea of how to make sure it will give me new randoms each time that would be very helpful.
I am using this as an image rotator:
http://automaticlabs.com/products/rotator
It basically gets a list of files, makes an array count to find out how many they are, and then does rand(0,count($fileList)) to get the image to pull when the script runs.
I've very simply used this like so, 3 times in one html file.
<img src="/rotator.php" />
<img src="/rotator.php" />
<img src="/rotator.php" />
I also tried using it in CSS:
#header {
width:860px;
height:120px;
background: #C6BB9D;
background-image: url("http://www.mysite.com/rotator.php");
background-repeat: repeat-x;
background-position: bottom;
}
The image still never changes. In the CSS I can somewhat guess that it simply only calls that image once and holds the information, but in the HTML it should call the image over and over again for each incarnation.
I am using this as an image rotator:
http://automaticlabs.com/products/rotator
It basically gets a list of files, makes an array count to find out how many they are, and then does rand(0,count($fileList)) to get the image to pull when the script runs.
I've very simply used this like so, 3 times in one html file.
<img src="/rotator.php" />
<img src="/rotator.php" />
<img src="/rotator.php" />
I also tried using it in CSS:
#header {
width:860px;
height:120px;
background: #C6BB9D;
background-image: url("http://www.mysite.com/rotator.php");
background-repeat: repeat-x;
background-position: bottom;
}
The image still never changes. In the CSS I can somewhat guess that it simply only calls that image once and holds the information, but in the HTML it should call the image over and over again for each incarnation.