Hello,

This is a reply to an e-mail that you wrote on Tue, 15 Jul 2003 at 21:14,
lines prefixed by '>' were originally written by you.
> Ok, assuming that the image files are outside the public web tree and
> you can read them with a script. You will have to write a php script
> that will read the file (sending the appropriate headers).
> So your script will generate html like
> <img src="/showimage.php?file=filename.jpg">
> then showimage.php will do something:
> header('content-type: appropricate/type');
> // content-length would be good
> readfile($file);

My addition to this advice would be to make sure you do some sort of
validation of $_GET['file'] before you use it within the readfile()
function or you have a security problem.  For example people could send a
request for /showimage.php?file=yourscript.php and they would be
presented with the source code to your PHP script.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

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

Reply via email to