开发者

Curl can't get a webpage properly

开发者 https://www.devze.com 2023-01-11 21:52 出处:网络
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

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, CURL开发者_JAVA百科OPT_ENCODING, "gzip");
$sourse = curl_exec($c);
curl_close($c);

echo $sourse;


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消