I have a problem connecting to a HTTPS server. I have tried several servers of which i know they support HTTPS, but i can't get response from any of these.
my code currently is:
$ch = curl_init ("https://sourceforge.net/");//paymentService.jsp");
$fp = fopen ("php_html.txt", "w");
$fp1 = fopen ("php_err.txt", "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_STDERR, $fp1);
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_MUTE, 0);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_FAILONERROR, 0);
curl_setopt ($ch, CURLOPT_SSLVERSION, 2);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "");
0);
echo curl_version();
echo curl_exec ($ch);
ECHO "<PRE>";
print_r( curl_getinfo($ch));
ECHO "</PRE><HR>";
curl_error($ch);
curl_close ($ch);
fclose ($fp);
The file php_html.txt stays emply (0 bytes).
The file php_err.txt says:
Your connection is using a weak random seed!
Closing live connection (#0)
And the page contains
libcurl 7.8 (OpenSSL 0.9.6a)
Array
(
[url] => https://sourceforge.net/
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => 0
[total_time] => 0
[namelookup_time] => 0.03
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
)
What am i doing wrong?