How to get the "transfer-encoding" and "Content-Encoding" headers from external urls with PHP?
===

I have a client who would like to get a web-based report on all the headers from a webservice response. My client also uses [SoapUI][1] to check on method responses and he can double-check the response headers on that application.

I have tried PHP [get_headers()][2] and [cURL][3] methods and have gained access to most header parameters, however my client can also get the "transfer-encoding" and "content-encoding" parameters via SoapUI and my PHP requests do not get these.

My PHP get_headers result (same as cURL):

    Cache-Control: private
    Content-Length: 3037
    Content-Type: text/html; charset=utf-8
    Server: Microsoft-IIS/7.5
    X-AspNet-Version: 2.0.50727
    X-Powered-By: ASP.NET
    Date: Wed, 18 Jul 2012 17:38:32 GMT
    

My client's SoapUI headers (I only pasted the ones that differ):

    Content-Type: application/soap+xml; charset=utf-8
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Transfer-Encoding: chunked

It is very important for me to get the full set of headers - like SoapUI does - via PHP on our web-based application. My client wants to check if the responses are chunked and/or compressed via gzip. Am I missing another method to achieve such headers?

  [1]: http://www.soapui.org/
  [2]: http://www.php.net/manual/en/function.get-headers.php
  [3]: http://stackoverflow.com/questions/9183178/php-curl-retrieving-response-headers-and-body-in-a-single-request