Reputation: 5832
All,
I am trying to HTTPS POST a SOAP request via PHP's cURL wrapper methods but keep getting the following cURL error: Error 1: Unsupported protocol: https, Any ideas why this is happening? The target URL is good and I'm able to reach it via commandline.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$this->apiURL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-type: text/xml;charset=UTF-8',
'Content-length: '.strlen($SOAPRequest),
'SOAPAction: ""'
) );
curl_setopt($ch, CURLOPT_POSTFIELDS, $SOAPRequest);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$result = curl_exec($ch);
Upvotes: 4
Views: 21090
Reputation: 8886
First check phpinfo();
If Curl is enabled in PHP as shown in the results of phpinfo() then
Upvotes: 7