Unfortunately, I cannot imagine any server-side script being able to do a timed reload; as, once a server-side script is executed, it is abandoned.
Is there any particular reason you are averse to using javascript to reload the image? You could easily build a timer that would reload the image every ___ seconds (or minutes, or however long you choose).
Your code could look something like:
Code:
<img src="http://www.kitco.com/images/live/gold.gif" id="goldchart" alt="Gold price chart" />
<script type="text/javascript" language="javascript">
// Create a function to change our picture
function changepic() {
// Instantiate a new date object, so we can get our timestamp
var d = new Date();
// Create a new image in the DOM
var i = document.createElement('img');
var j = document.getElementById('goldchart');
// Assign our source to the new image. We are going to append a nonsense query string, based on the current timestamp, to our image URI, in order to keep it from getting cached
i.src = "http://www.kitco.com/images/live/gold.gif?"+d.getTime();
// Assign the same ID we assigned to our original image
i.id = j.id;
// Assign the same ALT tag we assigned to our original image
i.alt = j.alt;
// Replace our original image with our new image
document.getElementById('goldchart').parentNode.replaceChild(i,document.getElementById('goldchart'));
// Set a timer to execute this function again
t = setTimeout("changepic()",10000); // The timer is currently set to 10,000 milliseconds (or 10 seconds)
}
// Instantiate our timer the first time
var t = setTimeout("changepic()",10000);
</script>