ZenphotoCMS Forum
Help with Hotlinking Protection - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Help with Hotlinking Protection (/thread-9524.html)



Help with Hotlinking Protection - darkufo - 2012-01-25

Hi,

I'm struggling to understand how I can prevent sites hotlinking to the full image

For example. This is site seems to hotlinking directly

http://www.tvrockstars.com/alcatraz-spoilers-episode-1-05-guy-hastings-promotional-photos/

The image they are linking to is this one.

http://www.spoilertv.co.uk/images/cache/pilot-shows/alcatraz/season-1/promotional-episode-photos/Episode%201.05%20-%20Guy%20Hastings/106Alcatraz-ep106_sc6_001_595.jpg

This is odd as in Options, Image I don't have Cached selected.

How can I stop this or clear the cache?

I'm very confused




Help with Hotlinking Protection - darkufo - 2012-01-25

I just found out how to clear cache. That seems to have fixed it for now.




Help with Hotlinking Protection - sbillard - 2012-01-26

There is no such image option for cached. Probably you are looking at the cache the full image option. That, as it says, applies to the full sized image.

All resized images are cached by zenphoto to avoid overhead of having to process them each time a page was referenced. Since the viewing browser must be able to load the image there is really no way of preventing someone who knows of the image from hotlinking it. You can obscure the names, but that will not help if someone can browse your site.

Anyway, if they can browse your site they can copy the image through any number of mechanisms--simplest is to get it from the local cache of their browser. Bottom line, if you can show the image on your site to the public, the public can capture the image and/or hotlink it.

You should probably watermark the image so that it indicates its origin.




Help with Hotlinking Protection - darkufo - 2012-01-26

Thanks, I've manage to write a simple htaccess script to block the offending site.

SITE REFERRER BANNING


RewriteEngine on
RewriteCond %{HTTP_REFERER} tvrockstars.com [NC]
RewriteRule .(jpg|png)$ - [F]




Help with Hotlinking Protection - acrylian - 2012-01-26

@sbillard: Hotlinking means of course referring to images directly on other sites like forums or blogs. This "steals" traffic and bandwidth and htaccess is indeed the way to prevent that. WE have a template file on the troubleshooting (don't remember where right now).




Help with Hotlinking Protection - darkufo - 2012-01-26

The thing is, is that we want the users to hotlink the thumbs that we generate but not the full

ie images with 100_cw85_ch85_thumb etc are fine to hotlink.




Help with Hotlinking Protection - acrylian - 2012-01-26

Sure, the principle is the same for all files and it can only be done like you did via htaccess.




Help with Hotlinking Protection - sbillard - 2012-01-26

@acrylian

There is no need to lecture me publicly here on the forum. I do indeed know what hotlinking is (probably better than you.) I was just trying to be helpful to darkufo.

The .htaccess fix will work, but only for identified domains which is only a specific fix. Not a general solution (because as I said, there is no general solution.)




Help with Hotlinking Protection - acrylian - 2012-01-26

@sbillard. Was not meant as "lecturing"...