tags:

views:

52

answers:

3

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
According to firebug, it indeed it is gzipped
Byron Whitlock
yet another reason why firebug is awesome
Scott M.
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
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.
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