samjsharples Posted September 30, 2014 Share Posted September 30, 2014 (edited) I am being sent an XML feed which needs to be downloaded in a 'compressed way'. The example I have been given is this: $url = 'http://myurl.com';$headers = "Accept-Encoding: gzip,deflate";$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);$data = curl_exec($ch); but the output I am getting is jargon like this with loads of black diamond question marks:� +T��sƒ���-}#v���]K���������HB�$&G�����Y�����'߷s�,�.4֫'?'���9;*9^��>�j~�ǫ}z|hq�J��Գ".o2)~b���U~I| How to a convert it back into XML? Many thanks Edited September 30, 2014 by samjsharples Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.