private function setRequestOptions($url, $vars, $options = array())
    {
        curl_setopt($this->request, CURLOPT_URL, $url);
        if (!empty($vars)) {
            curl_setopt($this->request, CURLOPT_POSTFIELDS, $vars);
        }

        # Set some default CURL options
        curl_setopt($this->request, CURLOPT_HEADER, true);
        curl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($this->request, CURLOPT_USERAGENT, $this->userAgent);
        curl_setopt($this->request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
        if ($this->cookieFile) {
            curl_setopt($this->request, CURLOPT_COOKIEFILE, $this->cookieFile);
            curl_setopt($this->request, CURLOPT_COOKIEJAR, $this->cookieFile);
        }
        if ($this->followRedirects) {
            curl_setopt($this->request, CURLOPT_FOLLOWLOCATION, true);
        }
        if ($this->referrer) {
            curl_setopt($this->request, CURLOPT_REFERER, $this->referrer);
        }

        # Set any custom CURL options
        foreach (array_merge($options, $this->options) as $option => $value) {
            curl_setopt($this->request, constant('CURLOPT_' . str_replace('CURLOPT_', '', strtoupper($option))), $value);
        }
    }
private function setRequestOptions($url, $vars, $options = array())
    {
        curl_setopt($this->request, CURLOPT_URL, $url);
        if (!empty($vars)) {
            curl_setopt($this->request, CURLOPT_POSTFIELDS, $vars);
        }

        # Set some default CURL options
        curl_setopt($this->request, CURLOPT_HEADER, true);
        curl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($this->request, CURLOPT_USERAGENT, $this->userAgent);
        curl_setopt($this->request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
        if ($this->cookieFile) {
            curl_setopt($this->request, CURLOPT_COOKIEFILE, $this->cookieFile);
            curl_setopt($this->request, CURLOPT_COOKIEJAR, $this->cookieFile);
        }
        if ($this->followRedirects) {
            curl_setopt($this->request, CURLOPT_FOLLOWLOCATION, true);
        }
        if ($this->referrer) {
            curl_setopt($this->request, CURLOPT_REFERER, $this->referrer);
        }

        # Set any custom CURL options
        foreach (array_merge($options, $this->options) as $option => $value) {
            curl_setopt($this->request, constant('CURLOPT_' . str_replace('CURLOPT_', '', strtoupper($option))), $value);
        }
    }
private function setRequestOptions ( $ url , $ vars , $ options = array ( ) ) { curl_setopt ( $ this -> request , CURLOPT_URL , $ url ) ; if ( ! empty ( $ vars ) ) { curl_setopt ( $ this -> request , CURLOPT_POSTFIELDS , $ vars ) ; } # Set some default CURL options curl_setopt ( $ this -> request , CURLOPT_HEADER , true ) ; curl_setopt ( $ this -> request , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ this -> request , CURLOPT_USERAGENT , $ this -> userAgent ) ; curl_setopt ( $ this -> request , CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_1_0 ) ; if ( $ this -> cookieFile ) { curl_setopt ( $ this -> request , CURLOPT_COOKIEFILE , $ this -> cookieFile ) ; curl_setopt ( $ this -> request , CURLOPT_COOKIEJAR , $ this -> cookieFile ) ; } if ( $ this -> followRedirects ) { curl_setopt ( $ this -> request , CURLOPT_FOLLOWLOCATION , true ) ; } if ( $ this -> referrer ) { curl_setopt ( $ this -> request , CURLOPT_REFERER , $ this -> referrer ) ; } # Set any custom CURL options foreach ( array_merge ( $ options , $ this -> options ) as $ option => $ value ) { curl_setopt ( $ this -> request , constant ( 'CURLOPT_' . str_replace ( 'CURLOPT_' , '' , strtoupper ( $ option ) ) ) , $ value ) ; } }
Sets the CURLOPT options for the current request

@param string $url
@param string $vars
@return void
@access protected
Sets the CURLOPT options for the current request