cURL / Mailing Lists / curl-library / Single Mail

curl-library

Fw: curl and basic authentification

From: Diana Castillo <diana_at_hotelkey.com>
Date: Tue, 4 May 2004 17:09:35 +0200

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?
function getResponse($request, $type){
  $curl_interface = curl_init();
  curl_setopt($curl_interface, CURLOPT_HTTPHEADER,array("Authorization: Basic " . base64_encode(AZOR_USR . ":" . AZOR_PASSWORD)));
  curl_setopt($curl_interface, CURLOPT_URL,AZOR_URL);
  curl_setopt($curl_interface, CURLOPT_POST, 1);
  curl_setopt($curl_interface, CURLOPT_POSTFIELDS,$request);
  curl_setopt ($curl_interface, CURLOPT_RETURNTRANSFER, 1);
  $xml_response=curl_exec ($curl_interface);
  curl_close ($curl_interface);
  return $xml_response;
 }

Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: diana_at_hotelkey.com
Web : http://www.hotelkey.com
      http://www.destinia.com
Received on 2004-05-04