Re: [PHP] Execute script then output image.
I found it. I used header(Location: http://www.yoursite.com/images/stat.gif;); -- JJ Harrison [EMAIL PROTECTED] www.tececo.com David Otton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 11 Jul 2002 22:01:03 +1000, you wrote: You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as content-length, and suppress error reporting. Then output the image data. There was a much simpler way. It just said the location of the file. I could use your method but the other one was much simpler. Is this what you meant? http://news.php.net/article.php?group=php.generalarticle=106348 http://news.php.net/article.php?group=php.generalarticle=106370 Looks like the same thing I suggested to me... $filename = your/file.gif; // output the correct content-type header header(Content-Type: image/gif); // take it's size and output it as content-length header(Content-length:.filesize($filename)); // Then output the image data readfile($filename); djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Execute script then output image.
Sorry, I lost the email that contained the info and I can't find it in the archives. How do I output a static image through a php script? it had something to do with headers but I can't remember exactly what. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute script then output image.
On Thu, 11 Jul 2002 21:00:36 +1000, you wrote: How do I output a static image through a php script? it had something to do with headers but I can't remember exactly what. You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as content-length, and suppress error reporting. Then output the image data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute script then output image.
There was a much simpler way. It just said the location of the file. I could use your method but the other one was much simpler. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com David Otton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 11 Jul 2002 21:00:36 +1000, you wrote: How do I output a static image through a php script? it had something to do with headers but I can't remember exactly what. You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as content-length, and suppress error reporting. Then output the image data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute script then output image.
On Thu, 11 Jul 2002 22:01:03 +1000, you wrote: You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as content-length, and suppress error reporting. Then output the image data. There was a much simpler way. It just said the location of the file. I could use your method but the other one was much simpler. Is this what you meant? http://news.php.net/article.php?group=php.generalarticle=106348 http://news.php.net/article.php?group=php.generalarticle=106370 Looks like the same thing I suggested to me... $filename = your/file.gif; // output the correct content-type header header(Content-Type: image/gif); // take it's size and output it as content-length header(Content-length:.filesize($filename)); // Then output the image data readfile($filename); djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php