CURL Returning Strange Characters
I need the output in standard text, is that compressed or something?
Yes, exactly that: it's gzip-compressed. Your options are
a) decompress it using e.g. gzdecode
b) tell the server you don't want a gzip-encoded response; the easiest way is to let curl handle this for you:
- delete
'Accept-Encoding: gzip, deflate',
from your header array - Add:
curl_setopt($ch, CURLOPT_ENCODING, 'identity');
somewhere before youcurl_exec()