cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Fw: curl

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 4 May 2004 17:09:17 +0200 (CEST)

On Tue, 4 May 2004, Diana Castillo wrote:

> Hi, I need to know why when I send petition with CURL like this, the machine
> I am sending to approves my authorization, but gets an empty request. What
> can I do to debug this?

My advice: use the command line version to fine-tune everything, then convert
it to PHP code.

> curl_setopt($curl_interface, CURLOPT_HTTPHEADER,array("Authorization: Basic
"
> . base64_encode(AZOR_USR . ":" . AZOR_PASSWORD)));

curl offers support for HTTP authentication already, in case you don't want to
do that stuff yourself... Not that Basic is very hard to do on your own of
course.

> $xml_response=curl_exec ($curl_interface);

There's a curl_errno() or something that you can use to see if the curl
operation did good or not.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-04