curl-and-php
Re: HTTPS/HTTP Page getting difference
Date: Sun, 17 Nov 2002 19:14:20 +0100 (MET)
On Sun, 17 Nov 2002, Svetlin Staev wrote:
> I am dealing with CURL for very little time but I am really getting to
> like it. I use it to get page contents from HTTP protocols but when I try
> to open an HTTPs one it returns no data. The code I use is:
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL,$which);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
> $re = curl_exec ($ch);
> curl_close ($ch);
>
> The server I run this on is Apache 1.3.17 with PHP 4.2.3 (libcurl/7.10.1
> OpenSSL/0.9.6 zlib/1.1.3). Am I doing something wrong or the code for HTTPS
> is different?
The problem here is probably that curl 7.10 and later tries to verify the
server's certificate against a CA bundle and you don't have that installed or
the server's certificate is self-signed or something.
A good start would be to figure out the error code.
Step two would be to read this: http://curl.haxx.se/lxr/source/SSLCERTS
(If anyone can provide a nice additional wording for PHP folks, I would
indeed be happy to add something to that document.)
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.htmlReceived on 2002-11-17