【问题标题】:Calling HTTPS request from laravel to external API从 laravel 调用 HTTPS 请求到外部 API
【发布时间】:2020-06-29 15:12:08
【问题描述】:

我正在开发应用程序以从其他站点获取 json 数据并显示在 laravel 的 html 表中。
我使用 Guzzle 发送请求。(stackoverflow question and finally use Guzzle)
当我基于 http 向外部 API 调用请求时,它显示了正确的数据!
我的问题是:
当我调用 HTTPS 链接在 laravel 中获取数据时,它转到 ssl 错误。
一些 API 地址只能在 HTTPS 中使用,

cURL error 60: SSL certificate problem: unable to get local issuer certificate

我能做什么?

【问题讨论】:

    标签: laravel ssl ssl-certificate guzzle


    【解决方案1】:

    解决了!
    这是我的answer

    1-Download this file: http://curl.haxx.se/ca/cacert.pem
    2-Place this file in the C:\wamp64\bin\php\php7.1.9 folder
    3-Open php.iniand find this line:
    

    【讨论】:

      猜你喜欢
      • 2014-04-16
      • 2016-11-26
      • 1970-01-01
      • 2022-11-07
      • 2017-02-12
      • 2023-03-24
      • 2020-05-12
      • 2021-08-02
      • 1970-01-01
      相关资源
      最近更新 更多