public function setBasicAuthentication($username, $password) { $this->setHttpAuth(self::AUTH_BASIC); $this->setopt(CURLOPT_USERPWD, $username . ':' . $password); }