and you should to a
strpos() on the HTTP_REFERER, instead of doing an exact match. HTTP_REFERER logs filenames, too. So you should do something along the lines of:
PHP Code:
if( isset( $_SERVER['HTTP_REFERER'] ) && !strpos( $_SERVER['HTTP_REFERER'] ), $_SERVER['HTTP_HOST'] ) ){
die('leecher!');
} else{
// blah blah blah
}