QUOTE(Sparkyg @ Nov 5 2006, 11:59 PM)
Nothing is Impossible (except ski-ing through a revolving door), it is possible to keep your images in a "hidden" folder then use a script to display the image
like
<img src="displaymyimage.php?imgid=myimage">http://forums.htmlhelp.com/index.php?act=Post&CODE=02&f=16&t=929&qpid=3838
and php would be something like
<?php
header ("Content-type: image/jpeg");
if (file_exists(hiddenpath.$_GET['imgid'])){
$img_handle = imagecreatefromjpeg(hiddenpath.$_GET['imgid'] ) or die("");
ImageJpeg ($img_handle);
}
?>
Providing there is no patterns for your image names, then this should give them a little bit of protection
Uh, "protection"? Can you explain what this "protection" is? Instead of the image address being "somewhere/myimage", it's now "displaymyimage.php?imgid=myimage". Well, great. Previously the browser asked for one address and got the image - now it asks for a different address and gets the image. Apart from a bit of work, the only real difference you've made is slightly degrading the image, by opening the jpeg into a bitmap, then recompressing it - which is supremely pointless.
As I said, if we knew what the OP was really trying to do, we might be able to help. I'm meaning sometime to block hot-linking to puzzle images (because the copyright is not mine), by generating one-off ids which I keep in a database, and expire after 24 hours. This should have a useful effect, which is more than I can see the above scheme achieving.
(You don't need to generate a new jpeg; the image script should simply copy the jpeg file to stdout.)