Page 1 of 1
No Image Download
Posted: Fri Aug 05, 2005 8:30 am
by phpdevuk
Hello,
I've just built a site that has product images displayed on it for a client, however I've discovered someone else has ripped the site off stealing images and other bits and bobs from the site. I want to try and stop them doing this so I've been looking at various methods of doing this.
So far I've come up with putting a bit of javascript into the page that stops right clicking (IE only unfortunately) and whacking a .htaccess file on the server to sop people linking to images etc.
These measures don't stop people going into the page in something like say firefox and just simply download images and saving them to disk.
Anyone know of any good ways to stop this?
Posted: Fri Aug 05, 2005 8:37 am
by shiznatix
your out of luck you cant stop this. even with the right click a user can still view sorce and get the image if they know a lil. images are downloaded to the client so there is no way of stopping it.
your best bet is to put property of yousite.com on the picture somewhere so if it shows up on another website you can be like blah blah im sueing or somthing
Nah Not possible
Posted: Fri Aug 05, 2005 8:37 am
by neophyte
Not possible.
I would not worry about it. Throw a water mark on all your images with your URL and get free advertising every time someone hotlinks to it and or shows it to a friend.

Posted: Fri Aug 05, 2005 8:52 am
by nielsene
There are a few "tricks" you can use to slow-down bulk copying of the site... Store the photos outside of the webroot and have a viewphoto.php?photoid=<someid> page to pass them through.
In the viewphoto.php page you could attempt to add some "throttling" controls, ie track/detect attempts to download large number of photos in rapid succession and then error out. However you have to be careful -- if you have a gallery view you could generate a lot of false positives. Perhaps have a view-thumbnail and a view-photo page with different limits.
Its not perfect and anyone who can see the photo on the screen can still download it, so adding a watermark style thing is good. This is most jus to stop someone from using wget or similar to screen scrap your whole site.
Posted: Fri Aug 05, 2005 9:05 am
by phpdevuk
yeah I'm aware of all the problems in doing it, water mark was something I thought about as all the iamges are created from gd library.
I did think about using a php script too and using the referer or something to make sure the page calling it is the products page, but essentially it still gets dumped in the browsers cache so its kinda alot of work for no gain.
Looks like I'm stumped.
Posted: Fri Aug 05, 2005 9:10 am
by feyd
you can specify the no-cache (among other) header properties.. however, it's up to the browser whether it'll honor that "deal"
generating a one time use "key" to allow downloading of the image to the browser's memory could help, although will require storing a lot of data in a database..
Posted: Fri Aug 05, 2005 11:13 am
by s.dot
Code: Select all
<body onContextMenu="return false;">
Should disable right clicking.
You could use javascript to 'encrypt' in a way the image names so when people view the source they see a bunch of jumble instead of the path to the image. I don't quite remember the name of the function but it's something like escape_string and it outputs a bunch of numbers like '90%89%%90332%'. I've used it on a site before to hide payment return URLs.
But as was said, it's not really possible considering the image is downloaded by the client user.
Posted: Fri Aug 05, 2005 5:14 pm
by bokehman
Here is a way that makes it quite confusing. Make a 1 pixel transparent gif. Use this as the image for all your images. Then display the real image as a CSS background. That way when they right click and save they are saving the 1 pixel transparent image.
Posted: Fri Aug 05, 2005 5:16 pm
by feyd
why not randomly do a mixture? sure, the page will take a little longer to load, but then it'll be confusing as hell to actually get the data consistently

Posted: Sun Aug 07, 2005 12:59 pm
by phpdevuk
all good ideas
Posted: Wed Jan 25, 2006 3:49 pm
by fine
Posted: Thu Jan 26, 2006 5:37 am
by phpdevuk
yeah I suggested watermarking images with a logo, but the problem was more one of the images being downloaded rather than that.