private function _isFqdn($hostname) { // We could do a really thorough check, but there's really no point if (false !== ($dotPos = strpos($hostname, '.'))) { return $dotPos > 0 && $dotPos != strlen($hostname) - 1; } return false; }