title: SSL Certificate with PHP CURL
body: <p>I'm using curl to send an xml file over https to the rightmove API - they supplied me with all the certificates. </p>
  
  <p>I am getting the error :</p>
  
  <blockquote>
    <p>60SSL certificate problem: unable to get local issuer
    certificateResult =</p>
  </blockquote>
  
  <p>I have tried everything i have found on every other stackoverflow post similar and nothing is working, i have tried downloading the old cacert.pem and changed the files in php.ini - ive installed my personal information file andcreated a certificate on the browser and local machine and nothing is removing the error 60.</p>
  
  <p>This is my PHP :</p>
  
  <pre><code>&lt;?php
    $xml = file_get_contents("myxml.xml");
  
    $ch = curl_init();
  
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt ($ch, CURLOPT_CAINFO, dirname(__FILE__).'\mypem.pem');
  
    curl_setopt($ch, CURLOPT_URL, "https://adfapi.adftest.rightmove.com/v1/property/sendpropertydetails");
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_POST, 1);
  
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_REFERER, 'https://adfapi.adftest.rightmove.com/v1/property/sendpropertydetails');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_VERBOSE , 1);
  
    $ch_result = curl_exec($ch);
  print curl_errno($ch);
  print curl_error($ch);
    echo "Result = ".$ch_result;
    curl_close($ch);
  
  ?&gt;
  </code></pre>
  
  <p>this has had me banging my head for days, i would be very grateful for any assistance.</p>