As one who has had to do the same thing and had gotten some help from
this list I'll put in my two cents.
<? $rand = rand(1000,9999); ?>
<img src="image.jpg?<? echo $rand; ?>
This echoes a ? with a random number behind the filename forcing a request
to the server for the image because you probably wont have that exact same
image with the random number in your cache.
On Tue, 10 Dec 2002, Adam White wrote:
> Guys, not sure if this is a PHP problem or a more general HTML problem,
> I've written a small test script (see below), basically, which allows the
> user to rotate an image by 90degrees.
> When I press the button, the page reloads having rotated the image, but the
> old image is still displayed. (I know it's done it if I load up another
> browser window)
> Pressing refresh does cause the image to reload.
> Any ideas???
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in
> the past
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
> header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Pragma: no-cache"); // HTTP/1.0
> <p />
> if($submit == "Rotate 90")
> $output=`mogrify -rotate 90 pictures/028_25.jpg`;
> echo "$output<p />";
> $submit=" ";
> echo "new value of submit=$submit";
> <form name="form1" action="<?php echo($PHP_SELF) ?>" method="post">
> <input type="submit" name="submit" value="Rotate 90">
> <p />
> <img src = pictures/028_25.jpg>
> Regards & thanks in advance
> Adam White
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php