PHP Curl - returned html all messed up
The output is gzip encoded. Try this option to decompress the content:
curl_setopt($ch, CURLOPT_ENCODING, '');
CURLOPT_ENCODING: The contents of the "Accept-Encoding: " header. This enables decoding of the response. Supported encodings are "identity", "deflate", and "gzip". If an empty string, "", is set, a header containing all supported encoding types is sent.