View Single Post
Old 02-18-2004, 12:01 PM  
Mojo Rizin
Confirmed User
 
Join Date: Dec 2002
Location: Chandler, AZ
Posts: 1,089
Hotlinking Punishment

Some nice code from a good friend of mine.

.htaccess:
RewriteEngine on
RewriteRule ^(.*)\.gif$ /punisher.php?file=$1.gif [L]

punisher.php:
?
$localsite = "yoursitename.com";
$ref = getenv("HTTP_REFERER");

if ($ref != "" & !preg_match("/$localsite/i", $ref)) {
header("HTTP/1.0 302");
header("Location: $ref");
}
else {
/* This doesn't work for some reason */
header("Content-Type: image/gif");
@readfile("$file");
}
?>

What this will do is automatically img src a hotlinkers entire site. Obviously you need to add < before the first ? mark

Enjoy..
__________________

Start Making Reel Profits Today!

VOIP Technology Is NOW
Mojo Rizin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote