RE: [PHP-DB] Automatically Refreshing png-Image'd Web Page

2004-03-19 Thread Paul Miller
I might be reading this wrong, but I do not think you should put your
meta refresh request in the png creation script.  It should be in the
html body script.

Index.php

Meta-refresh to call itself in 30 secs
Call to img src=php_radio_image_creation_script.php


php_radio_image_creation_script.php

header(Content-type: image/png) 
Echo image content

Hopefully this sudo code is enough to get what I am trying to say.  You
might have some caching issues, but that is another issue.

- Paul

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 19, 2004 11:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Automatically Refreshing png-Image'd Web Page


Howdy Listers,

The Background:
I am making dynamic, color-coded, png images of the floor plan of a 
building and displaying them in a browser.  Numerous radioactivity
sensors 
throughout the building send their readings to a MySQL dB, and the web 
page queries the dB, and depending on the readings, the areas specific
to 
the sensors will appear green for normal, yellow for high but
acceptable, 
and red for critical.  All this works OK.

The Problem:
Neither the HTML nor JavaScript code I usually use for automatically 
refreshing a page has any effect if the header(Content-type:
image/png) 
necessary for displaying the png image is included. If I comment out the

header() line, the page refreshes, but the image data comes through as 
hieroglyphics.  Obviously, I need to refresh the page to get the latest 
data, and to create and display the corresponding image.

The Question:
Is there any way to automatically refresh a web page displaying a png 
image?

Thanks in advance for any thoughts/insights into how I can solve this 
problem.

dave

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Automatically Refreshing png-Image'd Web Page

2004-03-19 Thread dpgirago
Thanks, Paul, you got it right. I was trying to do it all in one 
file/page. I'll have a go at your suggestion.

dave
 
 I might be reading this wrong, but I do not think you should put your
 meta refresh request in the png creation script.  It should be in the
 html body script.

 Index.php
 
 Meta-refresh to call itself in 30 secs
 Call to img src=php_radio_image_creation_script.php


 php_radio_image_creation_script.php
 
 header(Content-type: image/png) 
 Echo image content

 -Paul

Re: [PHP-DB] Automatically Refreshing png-Image'd Web Page

2004-03-19 Thread Adam Voigt
You might want to use iframe's so you can refresh just individual
sections when you need to.


On Fri, 2004-03-19 at 12:00, [EMAIL PROTECTED] wrote:
 Howdy Listers,
 
 The Background:
 I am making dynamic, color-coded, png images of the floor plan of a 
 building and displaying them in a browser.  Numerous radioactivity sensors 
 throughout the building send their readings to a MySQL dB, and the web 
 page queries the dB, and depending on the readings, the areas specific to 
 the sensors will appear green for normal, yellow for high but acceptable, 
 and red for critical.  All this works OK.
 
 The Problem:
 Neither the HTML nor JavaScript code I usually use for automatically 
 refreshing a page has any effect if the header(Content-type: image/png) 
 necessary for displaying the png image is included. If I comment out the 
 header() line, the page refreshes, but the image data comes through as 
 hieroglyphics.  Obviously, I need to refresh the page to get the latest 
 data, and to create and display the corresponding image.
 
 The Question:
 Is there any way to automatically refresh a web page displaying a png 
 image?
 
 Thanks in advance for any thoughts/insights into how I can solve this 
 problem.
 
 dave
-- 

Adam Voigt
[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php