当前位置:   article > 正文

php咪咕解析源码,关于咪咕视频的解析就是解析出m3u8

咪咕php源码

[PHP] 纯文本查看 复制代码pre(cget("http://www.miguvideo.com/wap/resource/migu/detail/Detail.jsp?cid=629484832"));

function pre($t){

header("Content-type:text/html;charset=utf-8");

echo "

";

var_dump($t);

// echo $t;

}

function cget($url, $cookies = '', $post = '')

{

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

//curl_setopt($ch, CURLOPT_HEADER, 1); //输出header信息

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);//location跟随

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); //规避HTTP 100

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //规避证书

if ($post) {

curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

}

if ($cookies) {

curl_setopt($ch, CURLOPT_COOKIE, $cookies);

}

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);

curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$re = curl_exec($ch);

curl_close($ch);

return $re;

}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/156338
推荐阅读
相关标签
  

闽ICP备14008679号