Curl request problem

sends a https request, sometimes it returns normal, sometimes it is abnormal.
exception error: Curl error: SSL certificate problem: Couldn"t understand the server certificate format

clipboard.png

find the code on the Internet, add two lines or so, how to solve it? The interface is unstable

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);    // https hosts
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
Mar.04,2022

CURLOPT_SSL_VERIFYHOST is set to 2


switch to guzzle library https://github.com/guzzle/guzzle

Menu