PHP cURL error code 60 SSL certificate problem self signed certificate in certificate chain

Error: When using PHP curl_exec() to a site with https and self signed certificate (which should be likely a staging site, not a production site)

Error code 60 SSL certificate problem: self signed certificate in certificate chain

Solution:

Since it is staging environment, we can completely ignore the certificate verification:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);