How solve cURL error 60: SSL certificate in Laravel 5?

前端 未结 2 1611
-上瘾入骨i
-上瘾入骨i 2021-01-16 14:44

I\'m using \"FriendsOfPHP/Goutte\" Package https://github.com/FriendsOfPHP/Goutte For web crawling... When I use \"http://\" links then it\'s ran correctly but when I use \"

2条回答
  •  花落未央
    2021-01-16 15:21

    Try disabling CURLOPT_SSL_VERIFYPEER to stop cURL from verifying the peer's certificate:

    $client->getClient()
           ->setDefaultOption('config/curl/' . CURLOPT_SSL_VERIFYPEER, false);
    

提交回复
热议问题