private function get_headers_from_curl_response($headers)
    {
        $headers = explode("\r\n", $headers);
        array_shift($headers);
        foreach ($headers as $line) {
            if (strstr($line, ': ')) {
                list($key, $value) = explode(': ', $line);
                $result[$key] = $value;
            }
        }
        return $result;
    }
private function get_headers_from_curl_response($headers)
    {
        $headers = explode("\r\n", $headers);
        array_shift($headers);
        foreach ($headers as $line) {
            if (strstr($line, ': ')) {
                list($key, $value) = explode(': ', $line);
                $result[$key] = $value;
            }
        }
        return $result;
    }
private function get_headers_from_curl_response ( $ headers ) { $ headers = explode ( "\r\n" , $ headers ) ; array_shift ( $ headers ) ; foreach ( $ headers as $ line ) { if ( strstr ( $ line , ': ' ) ) { list ( $ key , $ value ) = explode ( ': ' , $ line ) ; $ result [ $ key ] = $ value ; } } return $ result ; }
Retrieve the cURL response headers from the
header string and convert it into an array
@param  string $headers header string from cURL response
@return array
Retrieve the cURL response headers from the header string and convert it into an array