/** * REST GET * @param $url string base url * @param $data array parameters to be added in URL * @param $auth string auth token */ private function setHttpAuth() { if ($this->curl != null) { curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($this->curl, CURLOPT_USERPWD, Config::http_auth()); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($this->curl, CURLOPT_USERAGENT, 'GGW API TEST'); curl_setopt($this->curl, CURLINFO_HEADER_OUT, true); } }