If you just want to prevent users from getting a listing of your image directory, you can do a couple of things:
1) Put an empty 'index.html' (or whatever the server default is) in the image directory, so anyone trying to browse the directory will get a blank page. or 2) (Assuming your server is Apache) Create a '.htaccess' file in the images directory and add the line Options -Indexes Either one ought to be less of a performance hit than doing a readfile() on each image you want to send to the browser. :) This article has more stuff on .htaccess: http://www.codingclick.com/article.php?page=0&aid=3 HTH, -Andy > -----Original Message----- > From: andy [mailto:[EMAIL PROTECTED]] > hmm sounds logical. The idea was to protect the image directory > from people > who would like to download all the image files. Somebody told me to place > the dir outside the document root. So this seems to be wrong. > > What would you suggest to prevent people from downloading all the image > files? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php