Home > Article > Backend Development > How to solve php curl 56 error
The solution to the php curl 56 error is to set "curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);".
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
How to solve the php curl 56 error?
php curl access https site curl: (56) Recv failure: Connection was reset problem
Scenario
curl访问https协议的网站的时候,可能会获得上面的错误
Analysis
https协议是 ssl协议和http协议的组合,访问这类网站 需要检查ssl证书, 证书验证失败,没有访问权限
Solution
curl provides options to bypass ssl
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
Recommended study: "PHP Video Tutorial》
The above is the detailed content of How to solve php curl 56 error. For more information, please follow other related articles on the PHP Chinese website!