Jump to content

Image refreshing


s1ay

Recommended Posts

I have a PHP page that show's a picture but it only grab's the picture once.  If I refresh it all the stats on the page will refresh but the picture stay's the same.

I'm pretty sure the problem is in my php.ini and it is the php.ini-dist other than MySQL is enabled in it.

Here are the two PHP pages I'm using.  I'm a compleate PHP nub nub right now.  I'm working on learning it but am focusing on getting C++ down first.

Thanks

S1ay

 

PS.  File was Ziped with WinRAR.  At high compression.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/63230-image-refreshing/
Share on other sites

You could do it with javascript. Let me give you an example.

 

between the <head> and </head> tags of your site you place the following

<script>
function refreshimg()
{
  document.getElementById('stats').src = "stats.jpg";
  setTimeout("refreshimg();", 5000);
}
</script>

 

then call the function refreshimg() somewhere in your script, and create the image as below.

<img src = "stats.jpg" id = "refreshimg">

 

Sorry for it's not being PHP, but it might help you out :)

 

 

Link to comment
https://forums.phpfreaks.com/topic/63230-image-refreshing/#findComment-315215
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.