RE: [PHP] auto-refresh dynamic images
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Thu, 14 Sep 2000 06:34:52 +0000 |
| Subject: | RE: [PHP] auto-refresh dynamic images | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16722@lists.php.net to get a copy of this message | ||
Forgot the last bracket in the example... whoops!
Should be
Put the following in the page header:
<META HTTP-EQUIV="Refresh" Content="300; url=<?php echo $PHPSELF;
?>">
<META HTTP-EQUIV="Expires" CONTENT="0">
You could also do this if you are providing the images from a php file
ie <img src="latest.php" alt="My pretty picture">
latest.php
<?
header ("Pragma: no-cache");
header ("Cache-Control: no-cache, must-revalidate, max_age=0");
header ("Expires: 0");
header
[ open file code, read file, output file... etc]
?>
Good luck,
Lawrence.
-----Original Message-----
From: Lawrence.Sheed@dfait-maeci.gc.ca
[mailto:Lawrence.Sheed@dfait-maeci.gc.ca]
Sent: September 14, 2000 02:33 PM
To: erik@pacific-shores.com; php-general@lists.php.net
Subject: RE: [PHP] auto-refresh dynamic images
META's actually *do* work for images as well.
Add the magical lines
<META HTTP-EQUIV="Refresh" Content="300; url=<?php echo $PHPSELF; ?>"
<META HTTP-EQUIV="Expires" CONTENT="0">
You could also do this if you are providing the images from a php file
ie <img src="latest.php" alt="My pretty picture">
latest.php
<?
header ("Pragma: no-cache");
header ("Cache-Control: no-cache, must-revalidate, max_age=0");
header ("Expires: 0");
header
[ open file code, read file, output file... etc]
?>
-----Original Message-----
From: Erik Myllymaki [mailto:erik@pacific-shores.com]
Sent: September 14, 2000 01:27 PM
To: php-general@lists.php.net
Subject: [PHP] auto-refresh dynamic images
Hi,
I am generating some jpegs dynamically from a weatherstation program and
FTPing them to my webserver every 5 minutes. How do I get the PHP3 page to
force the images to be uploaded to the client's browser every time the page
is reviewed instead of getting the out of date images from cache?
Also, how do I get the page to refresh at a particular interval AND refresh
the jpegs? For instance if someone wants to leave thee page displayed ffor a
while and just have it refresh every 5 minutes to show the new images and
the coresponding change in weather?
<METAs...> work only for the text, NOT the jpegs. Will using the header()
function work for the images as well as text?
Any help appreciated.
Thanks,
--
Erik Myllymaki
erik@pacific-shores.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net