发送https请求,有时返回正常,有时异常。
异常报错:Curl error: SSL certificate problem: Couldn't understand the server certificate format
网上找的代码,加了两行还是如此,请问如何解决?接口不稳定
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
CURLOPT_SSL_VERIFYHOST 设置成 2