I am using this image rotator. It's great, but if I link to it multiple times on one page, it displays the same image. I don't know how many times it will be accessed, so using multiple identical scripts is impractical. How do I modify this script so that I can get a different image elsewhere on the page while using the same url? Is it possible?
EDIT: It turns out that there must have been some problem with the coding. I found a better code here, and it works if I use different queries on each link. Thanks to everyone who submitted answers!
Pass a different query string for each instance so that the browser retrieves it multiple times.
Your browser is seeing that each "rotated" image uses the same URL, so it caches the resulting image from the first request.
You can change this behaviour in two ways.
Suffix your "rotated" image URLs with a random string from php. Eg ("rotate.php?img=my_static_image.jpg&x=12345" This means the browser makes a fresh request for each image.
Make your rotate scrip redirect to a randomized url if it recives no extra parameters.