最近,我对我的URL进行了一些从HTTP到HTTPS的更改,一切都在使用HTTP,但是当我将其更改为HTTPS时,我在两侧curl_exec($ soap_do)和curl_error上都得到空响应( $ soap_do)。任何想法?
$url= "https://api.AppMain.svc?wsdl"; // asmx URL of WSDL
$soap_do = curl_init();
set_time_limit(0);
curl_setopt($soap_do, CURLOPT_URL, $url);
curl_setopt($soap_do, CURLOPT_AUTOREFERER, true);
curl_setopt($soap_do, CURLOPT_MAXREDIRS, 10);
curl_setopt($soap_do, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($soap_do, CURLOPT_CAINFO, APPPATH . "/RSA/GeoTrustGlobalCA.crt");
curl_setopt($soap_do, CURLOPT_POST, true );
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xml_post_string);
curl_setopt($soap_do, CURLOPT_VERBOSE, TRUE);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $headers);
// Converting
$response = curl_exec($soap_do);
$error = curl_error($soap_do);
if(curl_errno($soap_do))
{
echo "Curl Failed: " . curl_errno($soap_do), "<br/>";
echo curl_error($soap_do);
} else {
echo "Success"; // I'm getting success result but when I print $response it's blank.
}