从收缩的gzip压缩文件中检索内容

I am trying to fetch contents from a website using CURL in PHP. However, the issue is , the site is returning most probably a deflated or gzipped contents. See contents here and actual website here.

Is there any way to get the contents back. I need to retrieve the values available on the website. Any link or suggestion for this will be appreciated.

Thanks !

In your curl settings specify:

Accept-Encoding: gzip, deflate

as one of the headers.

Not tested, but I believe it is set as:

curl_setopt($ch,CURLOPT_ENCODING , "gzip");

You could load the gzipped file that you receive into a variable, then use gzuncompress().