cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLOPT_HTTPAUTH and Digest Authorization Required

From: Jon M <removed_at_removed>
Date: Sun, 20 Feb 2005 23:54:10 -0500

Just to clarify, the hosting company ran the following:

curl --trace-ascii temp.txt --insecure --digest --user tivo:xxxxxxxxxx
https://xx.xx.xxx.xx/nowplaying/index.html?Recurse=Yes

My script is as follows:

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($ch, CURLOPT_USERPWD, $passstr);
curl_setopt($ch, CURLOPT_URL, $fullurl);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$returned = curl_exec($ch);
echo $returned;
$code = curl_getinfo ($ch, CURLINFO_HTTP_CODE);
echo ("http code: $code<br>\n");
echo 'Errors: ' . curl_errno($ch) . ' ' . curl_error($ch) . '<br><br>';
curl_close ($ch);

-----Original Message-----
Most interesting, the hosting admin. ran trace as you requested and got the
desired output. Do I have some option enabled that I shouldn't?? I'm a bit
confused why it worked via command line..
Received on 2005-02-21