本文介绍了如何解决cURL错误60:Laravel 5中的SSL证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用"FriendsOfPHP/Goutte"包 https://github.com/FriendsOfPHP/Goutte对于网络爬网...当我使用"http://"链接时,它运行正确,但是当我使用"https://"时,则显示以下错误...
I'm using "FriendsOfPHP/Goutte" Package https://github.com/FriendsOfPHP/GoutteFor web crawling... When I use "http://" links then it's ran correctly but when I use "https://" then show the following errors...
推荐答案
尝试禁用CURLOPT_SSL_VERIFYPEER
以阻止cURL验证对等方的证书:
Try disabling CURLOPT_SSL_VERIFYPEER
to stop cURL from verifying the peer's certificate:
$client->getClient()
->setDefaultOption('config/curl/' . CURLOPT_SSL_VERIFYPEER, false);
这篇关于如何解决cURL错误60:Laravel 5中的SSL证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!