Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Disabling image saving
11-04-2009, 01:57 AM #1
- Join Date
- Jan 2006
- Thanked 3 Times in 3 Posts
Disabling image saving
I have seen websites that have test.php?file=blah.jpg for example that disables image saving (because it saves as a PHP file and hides the path) yet shows the JPG when it is requested by a browser. How would I go about replicating this?
EDIT: Renaming it to a jpg displays the real image.. is there any other way through PHP without putting a watermark?
Last edited by xGIHavoc; 11-04-2009 at 02:02 AM.
11-04-2009, 04:06 PM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
And how are you going to prevent someone just going to their cache folder and finding the image there?
Bottom line, if the browser can get it, the user can get it. The only way to prevent image save is to not publish the image.
Users who have thanked Fumigator for this post:
11-04-2009, 04:08 PM #3
- Join Date
- Oct 2008
- Some say it's everything.
- Thanked 397 Times in 390 Posts
Anyway, what you mention is really just a PHP page set up to direct file requests based on a database of locations. The script runs on a call to the page - which the browser makes for the image location - and it returns the file location to the browser. Even if the source code doesn't reveal the image location on the server the browser still knows where to find it - just check out Firefox/Firebug. Really, you could get pretty intricate with the implementation and make it virtually impossible for the average joe to find your true image path and these same people could still rip you off with low-tech options.
Pursuing this method of image "protection" would be a waste of time overall. The only real way to protect an image on the web is to add a water mark.The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS:
Seek and you shall find... basically: validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Users who have thanked Rowsdower! for this post: