private function _setupCurl()
    {
        $requestParams = http_build_query($this->requestParams);

        $this->uri = $this->action;
        if ($this->method == 'GET') {
            $this->uri .= '?'.$requestParams;
        }

        $this->curl = curl_init($this->uri);

        if ($this->method == 'POST') {
            // POST requests
            curl_setopt($this->curl, CURLOPT_POST, true);
            curl_setopt($this->curl, CURLOPT_POSTFIELDS, $requestParams);
        }

        // We want to receive the returned data
        curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
        // Setup custom user agent
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, $this->formatUserAgentInfo());
    }
private function _setupCurl()
    {
        $requestParams = http_build_query($this->requestParams);

        $this->uri = $this->action;
        if ($this->method == 'GET') {
            $this->uri .= '?'.$requestParams;
        }

        $this->curl = curl_init($this->uri);

        if ($this->method == 'POST') {
            // POST requests
            curl_setopt($this->curl, CURLOPT_POST, true);
            curl_setopt($this->curl, CURLOPT_POSTFIELDS, $requestParams);
        }

        // We want to receive the returned data
        curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
        // Setup custom user agent
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, $this->formatUserAgentInfo());
    }
private function _setupCurl ( ) { $ requestParams = http_build_query ( $ this -> requestParams ) ; $ this -> uri = $ this -> action ; if ( $ this -> method == 'GET' ) { $ this -> uri .= '?' . $ requestParams ; } $ this -> curl = curl_init ( $ this -> uri ) ; if ( $ this -> method == 'POST' ) { // POST requests curl_setopt ( $ this -> curl , CURLOPT_POST , true ) ; curl_setopt ( $ this -> curl , CURLOPT_POSTFIELDS , $ requestParams ) ; } // We want to receive the returned data curl_setopt ( $ this -> curl , CURLOPT_RETURNTRANSFER , true ) ; // Setup custom user agent curl_setopt ( $ this -> curl , CURLOPT_HTTPHEADER , $ this -> formatUserAgentInfo ( ) ) ; }
Initialize the cURL resource
@return void
Initialize the cURL resource