private function getHostFromUrl($url)
    {
        if (strpos($url, '//')) {
            $url = substr($url, strpos($url, '//') + 2);
        }
        if (($p = strpos($url, '/')) !== false) {
            $url = substr($url, 0, $p);
        }
        return $url;
    }
private function getHostFromUrl($url)
    {
        if (strpos($url, '//')) {
            $url = substr($url, strpos($url, '//') + 2);
        }
        if (($p = strpos($url, '/')) !== false) {
            $url = substr($url, 0, $p);
        }
        return $url;
    }
private function getHostFromUrl ( $ url ) { if ( strpos ( $ url , '//' ) ) { $ url = substr ( $ url , strpos ( $ url , '//' ) + 2 ) ; } if ( ( $ p = strpos ( $ url , '/' ) ) !== false ) { $ url = substr ( $ url , 0 , $ p ) ; } return $ url ; }
Return search engine host in URL

@param string $url
@return string host
Return search engine host in URL