【问题标题】:How to get the cookie value using curl如何使用 curl 获取 cookie 值
【发布时间】:2020-01-16 14:17:50
【问题描述】:

是否可以在 php 中使用 curl 获取 crumb 值? crumb 用作网站中的 cookie

【问题讨论】:

    标签: php curl cookies


    【解决方案1】:

    只要问 curl。

    $ch = curl_init('https://yourhost.com/image.png');
    curl_exec($ch);
    $info = curl_info($ch, CURLINFO_COOKIELIST);
    

    $info 现在包含一个包含所有已知 cookie 的数组。

    由于您没有提供足够的信息,我只能举个例子。

    【讨论】:

      猜你喜欢
      • 2018-10-15
      • 1970-01-01
      • 2019-07-13
      • 1970-01-01
      • 2014-12-09
      • 2021-04-06
      • 2014-11-28
      • 2019-01-23
      • 2011-05-17
      相关资源
      最近更新 更多