public function setAuthorizeInfo($username, $password) { if ($username != null) { #The password might be blank curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($this->ch, CURLOPT_USERPWD, "{$username}:{$password}"); } }