cURL and redirects - returning multiple headers?
You can get the information of the total header size, and split the string up like this:
$buffer = curl_exec($ch);$curl_info = curl_getinfo($ch);curl_close($ch);$header_size = $curl_info["header_size"];$header = substr($buffer, 0, $header_size);$body = substr($buffer, $header_size)
Information taken from the helpful post by "grandpa".