PDA

View Full Version : Protect Images from Bandwidth Thieves - php script or .htacc


TomKa
22nd of August 2003 (Fri), 08:56
Here are two possibilities to prevent the loading/linking of images from other websites.

with .htaccess:
http://www.thesitewizard.com/archive/bandwidththeft.shtml

or via a php script with the features of changing the output of the image or to send an email to the website admin if somebody sets a link to your images illegitimately:
http://www.thesitewizard.com/archive/protectimages.shtml

Ikinaa
22nd of August 2003 (Fri), 09:02
TomKa wrote:
Here are two possibilities to prevent the loading/linking of images from other websites.

with .htaccess:
http://www.thesitewizard.com/archive/bandwidththeft.shtml

or via a php script with the features of changing the output of the image or to send an email to the website admin if somebody sets a link to your images illegitimately:
http://www.thesitewizard.com/archive/protectimages.shtml

As is stated on the site : If they can view it, they can copy it.
An image thief does not have to link a picture to have it on his site.
The easiest for an image thief is to save it to his site. If he doesn't want to save it to his site, he can always save it to an anonymous site (10MB websites for nothing make this possible) and link the pics from there.
I don't think it's worth the effort protecting from linking if the effort can so easily be circumvented.

Peter Pan
22nd of August 2003 (Fri), 09:13
TomKa was speaking about bandwith theft. It's better to have somebody having to actually save your image, upload it to his site and use his own bandwith when displaying it that having somebody just put a link to you image and use the bandwith you're paying for.

Ikinaa
22nd of August 2003 (Fri), 09:15
Peter Pan wrote:
TomKa was speaking about bandwith theft. It's better to have somebody having to actually save your image, upload it to his site and use his own bandwith when displaying it that having somebody just put a link to you image and use the bandwith you're paying for.

oops... slightly off topic ... it seems 8)
sorry

Peter Pan
22nd of August 2003 (Fri), 09:37
You can find a htaccess generator to disable holinking with various options and methods (see the numbers at the bottom, some methods don't work sometimes dependeing of your webhost) here : http://www.htmlbasix.com/disablehotlinking.shtml

TomKa
22nd of August 2003 (Fri), 11:33
Thanks for the link, I've tested it. It works with images, that's ok.

But I have a setup in EE 1.5beta1 to display 360 degree panorama pictures with a java applet. Putting the .htaccess file in the image directory the java applet isn't able to load the image... hmm... any hints?

Aahh, the code from www.thesitewizard.com works also with pictures called from the java applet.

my .htaccess:

SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com$" locally_linked=1
SetEnvIfNoCase Referer "^http://your-domain-name-here.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://your-domain-name-here.com$" locally_linked=1
SetEnvIfNoCase Referer "^$" locally_linked=1

Order Allow,Deny
Allow from env=locally_linked