/** * Send the Curl post request * * @param $url string where we send the xml request * * @return bool returns false if there is a curl error */ private function sendRequest($url) { $this->curl = new cURL([CURLOPT_USERAGENT => self::CURL_AGENT]); $this->curl->setHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); $this->curl->setTimeout(self::CURL_TIMEOUT); try { $response = $this->curl->post($url, 'load=' . urlencode($this->request)); $this->response = $response->getData(); } catch (Exception $e) { return false; } return true; }