public function hostExists($url)
    {
        if (strpos($url, '/') === false) {
            $server = $url;
        } else {
            $server = @parse_url($url, PHP_URL_HOST);
        }
        if (!$server) {
            return false;
        }
        $ips = gethostbynamel($server);

        return !empty($ips);
    }
public function hostExists($url)
    {
        if (strpos($url, '/') === false) {
            $server = $url;
        } else {
            $server = @parse_url($url, PHP_URL_HOST);
        }
        if (!$server) {
            return false;
        }
        $ips = gethostbynamel($server);

        return !empty($ips);
    }
public function hostExists ( $ url ) { if ( strpos ( $ url , '/' ) === false ) { $ server = $ url ; } else { $ server = @ parse_url ( $ url , PHP_URL_HOST ) ; } if ( ! $ server ) { return false ; } $ ips = gethostbynamel ( $ server ) ; return ! empty ( $ ips ) ; }
Checks if the server specified in the url exists.
@param string $url URL to check
@return bool true, if the server exists; false otherwise
Checks if the server specified in the url exists .