cssmatt Posted March 30, 2006 Share Posted March 30, 2006 Im trying to protect a folder of images so that users cannot simply type in the URL and load the picture.My site has a login script so that only users who have access can view the pictures. So i want to be able to load these pics onto a webpage for viewing, but i dont want the folder accessible?!Is this possible, because ive tried quite a few chmod settings, and it seems that to view the image at all needs the Other setting to be 7 (execute). If i set it to anything else, the users cant access the folder dirst (which is what i want), but i cant view them through the webpage either!!Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/6182-chmod-folders/ Share on other sites More sharing options...
ober Posted March 30, 2006 Share Posted March 30, 2006 One way to do it would be to copy the image to a temporary folder when someone requests it. Once the user loads the image into cache (presumably at the end of the page load), you fire off an AJAX call that removes the image from the temp folder. They don't see you do it, and your images are safe. The only problem is that they've cached the image at this point, and anyone with half a brain can rob the file out of the browser cache.So really, the only way to protect images is to watermark them. Quote Link to comment https://forums.phpfreaks.com/topic/6182-chmod-folders/#findComment-22337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.