Good day,

Yep, this is possible all right.  I use this to display my rrdtool images.

Just have the php program as the target for the image, and then supply the
right header.  For a gif image:

header("Cache-control: private, no-cache");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Past date
header("Pragma: no-cache");
header("Content-type: image/gif");

Then, just output the raw data.  If you gather it with a shell command, use
passthru() .

There isn't anything to stop the user from saving the image, although the
above headers will request that the user's client not cache it.  You can
make it more difficult for the user by supplying a Javascript "override"
function to be executed when the user uses their right-mouse button over the
image.

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-----Original Message-----
From: Omland Christopher m [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 12:47 PM
To: Chris
Cc: [EMAIL PROTECTED]
Subject: [PHP] Loading Images


I don't have any code for this, but I'm hoping someone can point me in the
right direction. I want to load images or navigation menus dynamically. Is
it possible to build a database of images and then use php to display
them? Or something along these lines. I know this must be possible,
becuase I see sites that do something like this, and I cant seem to right
click the image and save it. Does this make any sense?
Thanks.
-Chris



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

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

Reply via email to