I'm writing a function to test if a remote file is being send as gzipped or not.
I was hoping to figure this out using Curl and the response headers yet noting shows up.

function return_headers($url){
$curl = curl_init($url);
$agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5";
curl_setopt($curl,CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($curl,CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($curl,FOLLOWLOCATION,true);
curl_setopt($curl,CURLOPT_USERAGENT,$agent);
curl_setopt($curl,CURLOPT_HEADER, true);
curl_setopt($curl,CURLOPT_NOBODY ,false);
$headers = curl_exec($curl);
//get the download size of page
return $headers;
}

My function with Yahoo:
HTTP/1.1 200 OK
Date: Fri, 10 Apr 2009 11:25:59 GMT
Set-Cookie: D=; expires=Thu, 01-Jan-1970 00:00:00 GMT; path=/; domain=.yahoo.com
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
Cache-Control: private
Vary: User-Agent
Set-Cookie: IU=deleted; expires=Thu, 10 Apr 2008 11:25:58 GMT; path=/; domain=.yahoo.com
Set-Cookie: FPCM=deleted; expires=Thu, 10 Apr 2008 11:25:58 GMT; path=/
Set-Cookie: PH=deleted; expires=Thu, 10 Apr 2008 11:25:58 GMT; path=/; domain=.yahoo.com
Set-Cookie: D=_ylh=X3oDMTFka2FmZWo3BF9TAzI3MTYxNDkEcGlkAzEyMzkzNjE1ODgEdGVzdAMwBHRtcGwDaW5kZXgtbA--; path=/; domain=.yahoo.com
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

Yet in firefox live headers I can see "Content-Encoding: gzip"

Anyone know how this can be done plz?