Well i'm not sure it works.. because you are checking the server.. which is allways the same.. I think it should be the referrer..
I came up with a little more complicated solution.. (actually i dont use the watermark but only load a different picture saying its stolen...)
I havent tested it with watermark... but it should work unless there is a typo
In this version I replaced the loading of my image with the watermark..
What it should do:
if you set $vba_options['check_referer'] = 1; then a hotlinked picture is watermarked... the picture can still be viewed in the browser (as a popup for example without watermark.
If you set the second parameter to 1 ($vba_options['force_referer'] = 1; ) then the picture in the browser is watermarked also.. (attention... some browsers do not send referers corectly, so some of your users using some flavors of beta mozillas could also see the watermark).. just make sure you dont set the original pic to open in a new window..
the third parameter to set are the good referers.. just replace yourhost.com by your sites host called in the url... (without the www. is better)
ok.. lets test it:
like in brians version find:
Code:
Content visible to verified customers only.
end replace it with:
Code:
Content visible to verified customers only.
What would be more elegant.. would be to cache the watermarked images...
i.e. create a subdirectory watermark in the users directory and write the watermarked image there... if the file exists.. you would not waste ressources watermarking the picture but could simply change the imagelocation to point to the watermarked image. (but that goes only for high traffic sites)
Luc