I have to make a request to a web-service using php curl. I have to use this code to generate the request:
$ch = curl_init();
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
I often get an error: SSL Error
when I try to make the request curl.
On average I have to make about 2 requests (with this error) before getting a good request with the correct result.
Something wrong?
I'm not interested in the absolutely to SSL. The service that I have to invoke use HTTPS.