Reven’s blog

Archive for the 'web & design' Category

Fighting hotlinking -the bad and mean way-

A lot has been written on hotlinking. One would think that by now those leechers would have got the idea and that they would have learned enough netiquette to stop SHOUTING IN FORUMS and to not steal your images (and your bandwidth). But, hey, they haven’t. No fuss, we’re smarter. Let’s fight back.

One of the best articles on how to prevent hotlinking was published by “A list apart” (Smarter Image Hotlinking Prevention). It’s a really professional, complete and accessible solution based on a little php coding and some htaccess hacking. I really recommend this approach. But I wanted something meaner, because we want to fight it but we also want to get this idea trough: “Hey! Stop doing that!”. And besides, we want to have fun ;) This can alos be done with htacess rules, but we are not *that* bad, so we are going to tolerate a little bit of hotlinking if it’s a fair use (i.e. the person mentions our site or links back to us).

So here’s my approach: we’ll write a script that checks our logs for hotlinks, we’ll set a cron job to run that script just before our logs are rotated and then mails us the results. After we check the hotlinks we’ll decide if it’s fair use and if it isn’t we’ll give the thief a little surprise (“goatse” is the keyword here). Let’s go.

Read more

1 comment