RE: [PHP] Streaming a jpg
| From: | Matthew Loff | Date: | Sun, 12 Aug 2001 15:24:10 +0000 |
| Subject: | RE: [PHP] Streaming a jpg | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62309@lists.php.net to get a copy of this message | ||
Say your image is called 12345.jpg...
showimage.php:
<?php
if(is_file("/your_www_dir/images/$imageid.jpg"))
header("Location: /images/$imageid.jpg");
else
header("Location: /images/notfound.jpg");
?>
notfound.jpg can be a "Image Not Found" graphic or something similar.
In your HTML, just call that script...
<IMG SRC="showimage.php?imageid=12345">
-----Original Message-----
From: Todd Cary [mailto:todd@aristesoftware.com]
Sent: Sunday, August 12, 2001 11:04 AM
To: Don Read
Cc: php-general@lists.php.net
Subject: Re: [PHP] Streaming a jpg
Don -
What I am trying to do is avoid having the location of the JPEG
available to the surfer. An idea I have is to pass a parameter to the
image. For example:
showimage.php?imageid=12345
My PHP script will get the location of the image and "read" it into
memory. Then my HTML page will "somehow" use the image in memory rather
than the usual <IMG...> tag.
This currently works:
<IMG alt="" border=0
src="http://209.204.172.137/CANADA_RIDE_2001/Flag.jpg">
Is there a way to replace the SRC property with a memory image?
Todd
--
Todd Cary
Ariste Software
todd@aristesoftware.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