Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've been trying to grab one page via Curl but fail to do it properly as the page is returned 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!

$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;
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
153 views
Welcome To Ask or Share your Answers For Others

1 Answer

This is not a curl related problem. It downloads the content properly. You have to include a <base href="http://www.movinsane.com/"/> before writing out the $sourse.

My opinion is that these type of actions are phishings.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...