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

curl-and-php

Re: CURL : question

From: Emmanuel Forgues <Emmanuel.Forgues_at_e-forgues.com>
Date: Mon, 14 Nov 2005 23:55:56 +0100

Dear All,

I have a problem using curl-7.15.0 with PHP.
I would get the "data" from an proxy appliance. the authentication is on
mode Basic and I using the following code :

equipment : name/ip of the equipment
port : 8081
path : url of the data

===========[ CODE ]==================================================
     $url="http://". $equipment .":8081". $path;
         $cUrl = curl_init();
         curl_setopt($cUrl, CURLOPT_URL, $url);
         curl_setopt($cUrl, CURLOPT_HEADER, 0);
         curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($cUrl, CURLOPT_USERPWD, "_myadmin:cod!sec");
         curl_setopt($cUrl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

         echo "<BR><HR><BR>====[content]====<BR>";
         $store = curl_exec($cUrl);
     echo $store;

         curl_close($cUrl);
======================================================================

With this code the result is : Code 200 Ok
but no data after ...
If I trying the url used directly, after authentication I have the web
Page with the data.

How can I get them ?

Many thanks for your help.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-11-15