public function useProxy($proxy_host, $proxy_port = 80, $auth_type = null, $auth_username = null, $auth_password = null, $proxy_type = Proxy::HTTP)
    {
        $this->addOnCurlOption(CURLOPT_PROXY, "{$proxy_host}:{$proxy_port}");
        $this->addOnCurlOption(CURLOPT_PROXYTYPE, $proxy_type);
        if (in_array($auth_type, array(CURLAUTH_BASIC,CURLAUTH_NTLM))) {
            $this->addOnCurlOption(CURLOPT_PROXYAUTH, $auth_type)
                ->addOnCurlOption(CURLOPT_PROXYUSERPWD, "{$auth_username}:{$auth_password}");
        }
        return $this;
    }
public function useProxy($proxy_host, $proxy_port = 80, $auth_type = null, $auth_username = null, $auth_password = null, $proxy_type = Proxy::HTTP)
    {
        $this->addOnCurlOption(CURLOPT_PROXY, "{$proxy_host}:{$proxy_port}");
        $this->addOnCurlOption(CURLOPT_PROXYTYPE, $proxy_type);
        if (in_array($auth_type, array(CURLAUTH_BASIC,CURLAUTH_NTLM))) {
            $this->addOnCurlOption(CURLOPT_PROXYAUTH, $auth_type)
                ->addOnCurlOption(CURLOPT_PROXYUSERPWD, "{$auth_username}:{$auth_password}");
        }
        return $this;
    }
public function useProxy ( $ proxy_host , $ proxy_port = 80 , $ auth_type = null , $ auth_username = null , $ auth_password = null , $ proxy_type = Proxy :: HTTP ) { $ this -> addOnCurlOption ( CURLOPT_PROXY , "{$proxy_host}:{$proxy_port}" ) ; $ this -> addOnCurlOption ( CURLOPT_PROXYTYPE , $ proxy_type ) ; if ( in_array ( $ auth_type , array ( CURLAUTH_BASIC , CURLAUTH_NTLM ) ) ) { $ this -> addOnCurlOption ( CURLOPT_PROXYAUTH , $ auth_type ) -> addOnCurlOption ( CURLOPT_PROXYUSERPWD , "{$auth_username}:{$auth_password}" ) ; } return $ this ; }
Use proxy configuration
@param string $proxy_host Hostname or address of the proxy
@param int $proxy_port Port of the proxy. Default 80
@param string $auth_type Authentication type or null. Accepted values are CURLAUTH_BASIC, CURLAUTH_NTLM. Default null, no authentication
@param string $auth_username Authentication username. Default null
@param string $auth_password Authentication password. Default null
@return Request
Use proxy configuration