How to parse the header returned by cURL?
问题 I am trying to communicate to an API using cURL. One of the methods require that I pass the value of the ININ-ICWS-CSRF-Token header (ie. WAhtYWxoYXlla1dBY2NvUkRJWCQxZmUxZWFhZS0xZTE0LTQyNGYtYjdhZS0zNmZjN2MxYWJmODBYCjEwLjAuNC4xNjA= ) and the Set-Cookie (ie. icws_904586002=bf7c7783-6766-4c4f-862b-48f25a9a3741 ) so I need to extract them so I can pass them later in my code. Here is what I did to extract the header and the body from the cURL/API respond: $respond = curl_exec($ch); //throw cURL