RE: Digest Authentication in php curl
Date: Thu, 16 Aug 2007 09:28:28 +0100
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: 16 August 2007 08:12
To: curl with PHP
Subject: Re: Digest Authentication in php curl
On Wed, 15 Aug 2007, Luke Painter wrote:
> I'm trying to use curl for digest authentication but I'm getting
> Is it possible to use php curl for digest authentication?
> I followed a thread about digest authentication for the c api so I
> know it's available in the library directly.
> $headers = 'Accept: */*';
This is already done by libcurl itself.
> $headers = "Content-Length: $lengh";
I strongly advice to not set this, as you confuse libcurl greatly if you
set the wrong size. libcurl (or possibly the binding layer) will set
this header by itself to the actual length of the data you pass in
> curl_setopt($poster, CURLOPT_CONNECTTIMEOUT, 2);
This seems very strict.
> curl_setopt($poster, CURLOPT_CUSTOMREQUEST, 'POST');
For further analysis, please state your libcurl version, your operating
system and how us what response headers you get from this request
(CURLOPT_VERBOSE might help you).
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php -----Original Message----- Thanks for all the advice. Length header was indeed the answer and it's now working a treat. Muchos gracias, senores. Book your free place now at Talis Insight 2007 www.talis.com/insight Find out more about Talis at www.talis.com Shared InnovationTM Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited. Talis Information Ltd is a member of the Talis Group of companies and is registered in England No 3638278 with its registered office at Knights Court, Solihull Parkway, Birmingham Business Park, B37 7YB. _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2007-08-16