mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-05 15:27:56 +00:00
Merge branch 'patch-1' of git://github.com/k00ni/php-curl-class into k00ni-patch-1
* 'patch-1' of git://github.com/k00ni/php-curl-class: Add setDigestAuthentication to Curl class
This commit is contained in:
@@ -291,6 +291,13 @@ class Curl
|
||||
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
||||
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
||||
}
|
||||
|
||||
public function setDigestAuthentication($username, $password = '')
|
||||
{
|
||||
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
||||
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
||||
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
||||
}
|
||||
|
||||
public function setCookie($key, $value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user