Questions about Hotlinking/Direct Link for images mp3 pdf using cookies/sessions Questions about Hotlinking/Direct Link for images mp3 pdf using cookies/sessions
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Questions about Hotlinking/Direct Link for images mp3 pdf using cookies/sessions

Started by twistedcain, May 29, 2008, 10:44:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

twistedcain

Preventing hotlinking (direct links) for images is typically done by checking referer in .htaccess, but this will be of little help with other files, like audio and video files, because most audio/video players don't send referer information.

I was looking into some solutions posted over at webmasterworld, one thread in particular talks about implementing cookies (with no example) and using sessions (with example).

Before I venture into trying to block mp3 hotlinkers, is any of this protection already built into CPG? If not, are there any tutorials or mods on how to do this specifically for the CPG?

While were on the subject of hotlinking... Images (jpg,gif,png), "blogger.com" has an unique way of blocking the direct viewing of their full size images. For example, look at the source code for this image. It's obvious they simply changed the pages extension to read "jpg" even though it's clearly a html page, but when looking at their code for the image source <img src="http://bp0.blogger.com/_Potx4fnuRaU/SCpT3IQw6KI/AAAAAAAAEbY/gzBP0GmwB4w/s1600/modern%2Bancient.jpg". If you try to view the image, it opens up a download dialog box. Considering that CPG is mainly about photos, would adding a similar process to protect images here be beneficial or is it a bad idea? If it is a bad idea, why?

My main concern though is to deter mp3 hotlinkers, so any help would be greatly appreciated.