PHP, curl, and raw headers

后端 未结 4 1714
时光取名叫无心
时光取名叫无心 2020-12-13 13:05

When using the PHP curl functions, is there anyway to see the exact raw headers that curl is sending to the server?

4条回答
  •  星月不相逢
    2020-12-13 13:38

    AFAIK, the PHP/CURL binding still lacks proper support for CURLOPT_DEBUGFUNCTION which is a callback from libcurl that can provide all those details.

    That's the primary reason why I recommend people to work out HTTP scripting things with the curl command line tool and its --trace-ascii option FIRST, then translate that into a PHP function.

提交回复
热议问题