On Wednesday 31 October 2001 14:48, René Fournier wrote:
> Nope, unfortunately, nothing.  It's a really weird problem.  It's
> like the PHP function I wrote for generating the random image will
> only work the first time.
I think it is not php that caches it. As I undertsand you wrote a 
script that generates an image, and give it back to the browser in an 
<img src=...> html tag. Am I right?
I hope I am, so I continue :))
Images can be cached in many places (proxies, browser), but 
definietly not in php. Your script that generates in the image and 
should be called every time by the <img> html tag, won't ever called 
again if the previous image were stored somewhere. You should send 
"pragma no-cache" and other http headers (many posts were on this 
"cache headers" topic) from the script that generates and gives back 
the image.
Or another sollution is that you can call your script with a random 
number or better with the current date and time, so you images's name 
won't be the same, and caches can't give back the old image.
for example: 
<?php echo"<img src=\"generatebackground.php?x=".date("YmdHis"). 


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to