$allowedhosts= array(); $allowedhosts[]= "spiritual-connections.com"; if(in_array($http_host, $allowedhosts)) { $referrer_parts['host']= $http_host; }