I've been trying to grab one page via Curl but fail to do it properly as the page returns badly encoded. Here's the page: http://www.movinsane.com/play13.php?vid=107628 Would you please tell me what how to do it with the help of PHP's Curl so that I can view it properly. Any help would be much appreciated. Thanks in advance!
A:
If Scott M. is right, you just need to set the encoding to understand gzip:
curl_setopt($ch, CURLOPT_ENCODING , "gzip");
Byron Whitlock
2010-08-16 04:05:51
According to firebug, it indeed it is gzipped
Byron Whitlock
2010-08-16 04:07:54
yet another reason why firebug is awesome
Scott M.
2010-08-16 04:14:50
A:
This doesn't work either:
$c = curl_init('http://www.movinsane.com/play13.php?vid=108561');
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($c, CURLOPT_ENCODING, "gzip");
$sourse = curl_exec($c);
curl_close($c);
echo $sourse;
(Sorry, couldn't edit my question as had cookies turned off when posting.)
Davil Saloman
2010-08-16 04:14:20
it works on my server... youre doing it wrong. can you post your error messages? what is the output you get and what is the expected output?
Scott M.
2010-08-16 04:56:25
A:
Scott M, yes, i just checked it out on my host and it works well, but had been testing on localhost and it did not work - it output fancy characters instead of Hebrew.
Davil Saloman
2010-08-16 05:21:24