public function setBasicAuthentication($username, $password = '') { $this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $this->setOpt(CURLOPT_USERPWD, $username . ':' . $password); }
private function connect() { $curl = new Curl(); $curl->setBasicAuthentication($this->adminUsername, $this->adminPassword); $curl->setUserAgent(''); $curl->setReferrer(''); $curl->setHeader('X-Requested-With', 'XMLHttpRequest'); $this->curl = $curl; }