Andre,
The 2007 Endpoint is deprecated in CRM 2013 I thought??
Anyway I have just discovered the answer.
The following is a snapshot of my code
$cURLHandle = curl_init();
curl_setopt($cURLHandle, CURLOPT_URL, $soapUrl);
curl_setopt($cURLHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cURLHandle, CURLOPT_TIMEOUT, 60);
curl_setopt($cURLHandle, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($cURLHandle, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($cURLHandle, CURLOPT_SSLVERSION, 3);
curl_setopt($cURLHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($cURLHandle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($cURLHandle, CURLOPT_POST, 1);
curl_setopt($cURLHandle, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($cURLHandle);
curl_close($cURLHandle);
Two things needed to be fixed here. Firstly I was doing nothing when there was an issue here where I really should be replacing this line
$response = curl_exec($cURLHandle);
With this
if( ! $response = curl_exec($cURLHandle))
{
trigger_error(curl_error($cURLHandle));
}
And secondly it appears the SSL version being used has been modified at the Microsoft end presumably. By changing this line
curl_setopt($cURLHandle, CURLOPT_SSLVERSION, 3);
To version 4 instead of 3 it started working! So instead of this i've just commented out this line entirely.
Hope this helps someone else!