问题
This command works directly in bash:
curl --sslv3 -k 'https://www.test_site.com/test/abc.do'
It does not work in bash without both --sslv3 and -k
I've been trying to replicate in PHP with the following code but I get no response at all. Not even an error. Would appreciate any advice.
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"https://www.test_site.com/test/abc.do");
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSLVERSION, 3);
$result = curl_exec ($curl);
curl_close ($curl);
print $result;
回答1:
nevermind. Typo on my part. Works fine with both the ssl and other command.
来源:https://stackoverflow.com/questions/20183083/curl-in-php-sslv3-works-in-bash-but-not-in-libcurl