$http_host = preg_replace('#^www\.#i', '', $http_host);
$allowedhosts= array(); $allowedhosts[]= "subdomain.yoursite.com"; $allowedhosts[]= "othersite.com"; $allowedhosts[]= "subdomain.othersite.com"; if(in_array($http_host, $allowedhosts)) { $referrer_parts['host']= $http_host; }