private function extractHost($url)
    {
        $urlParts = parse_url($url);
        if (isset($urlParts['host']) && strlen($host = $urlParts['host'])) {
            return $host;
        }

        return false;
    }
private function extractHost($url)
    {
        $urlParts = parse_url($url);
        if (isset($urlParts['host']) && strlen($host = $urlParts['host'])) {
            return $host;
        }

        return false;
    }
private function extractHost ( $ url ) { $ urlParts = parse_url ( $ url ) ; if ( isset ( $ urlParts [ 'host' ] ) && strlen ( $ host = $ urlParts [ 'host' ] ) ) { return $ host ; } return false ; }
Extract host from URL

@param string $url URL

@return string|false
Extract host from URL