Ver originalpreg_match('@^(?:http://)?([^/]+)@i', $_SERVER['HTTP_REFERER'], $matches);$host = $matches[1];preg_match('/[^.]+\.[^.]+$/', $host, $matches);$domainName = "{$matches[0]}";