Hi. I have this script that I use for logging referrer urls.

Code:
<?php
$file = "refers.txt";
$log_ip = 0;
$url = parse_url($_SERVER['HTTP_REFERER']);
$referer = (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == '') ? 'an unknown url/direct access (typing in URL)' : $_SERVER['HTTP_REFERER'];
$ip = ($log_ip == 1) ? $_SERVER['REMOTE_ADDR'] : false;
$time = date('d F Y');
$user_text  = ($log_ip == 1) ? "On {$time} {$ip}" : "On {$time} a user";
$refer_text = "{$referer}";

if ($url['host'] !== $_SERVER['HTTP_HOST'] && $referer != 'an unknown url/direct access (typing in URL)')
{

$fp = fopen($file, 'a');
fwrite($fp, "{$refer_text}\n");
fclose($fp);

}

?>
Is it possible to not log referrers from a particular url domain? So for example, if a user came from a site called www.testsite.com it wouldn't log that referrer visit in the text file?

Thanks.