public static function createFromUrl($url, $user = null, $password = null,
            $headers = array(), $getParams = array(), $postParams = array(),
            $content = null)
    {
        $rowUrl = parse_url($url);
        if (empty($rowUrl["host"]))
        {
            throw new HTTPStatus502Exception("The host is not defined", 502);
        }
        if ($user !== null)
        {
            $rowUrl["user"] = $user;
            $rowUrl["pass"] = $password === null ? "" : $password;
        }
        $getParamsHelp = array();
        if (isset($rowUrl["query"]))
        {
            parse_str($rowUrl["query"], $getParamsHelp);
            unset($rowUrl["query"]);
        }
        $getParams = array_merge($getParamsHelp, $getParams);
        $method    = Utils::$METHOD_GET;
        if ($content !== null || count($postParams) > 0)
        {
            $method = Utils::$METHOD_POST;
        }

        $headers['Host'] = $rowUrl['host'];

        return new ProxyQuery($rowUrl, $method, $content, $getParams,
                $postParams, $headers);
    }