芒果TV云视频解析

  • 内容
  • 相关
<?php
/*

调试方法[仅支持芒果TV免费视频]:
[输出MP4] php?url=https://www.mgtv.com/b/317619/4070323.html
[输出M3U] php?url=https://www.mgtv.com/b/317619/4070323.html&type=m3u8

*/
error_reporting(0);
header('Content-Type: application/json;charset=UTF-8');
extract($_GET);
$url_ = 'url_';$json_ = 'json_';$sk_ = 'sk_';$vb_ = 'vb_';$fmt_ = '&fmt=4';"${$url_()}";
function sk_($url){
        $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1');
        curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.$_SERVER["REMOTE_ADDR"], 'CLIENT-IP:'.$_SERVER["REMOTE_ADDR"]));
        curl_setopt($curl, CURLOPT_REFERER, '');
        $Appfu_ = curl_exec($curl);
    curl_close($curl);
        $vb_ = &$GLOBALS['vb_'];
        return "${$vb_($Appfu_)}";
}
function url_(){
        $url = &$GLOBALS['url'];
        $url ? $url : exit('URL缺失');
        preg_match('|/([0-9]+)/([0-9]+)|i', $url, $did);
        $api = 'https://mdata.api.mgtv.com/remaster/uc/getSource?t='.time().'&abroad=0&partId='.$did[2].'&clipId='.$did[1].'';
        $json_ = &$GLOBALS['json_'];
        return "${$json_($api)}";
}
function vb_($zfc){
        $fmt_ = &$GLOBALS['fmt_'];
        $type_ = &$GLOBALS['type'];
        $hxy = 'https://disp.titan.mgtv.com';
        $jk = json_decode($zfc)->data->stream;
        if ($type_=='m3u8'){
                $Uappfu = $hxy.$jk->m3u8Url[0];
        }else{
                $Uappfu = $hxy.$jk->mp4Url[0];
        }
        $appfu = $Uappfu.$fmt_;
        header('location:'.$appfu);
        exit();
}
function json_($api_){
        $sk_ = &$GLOBALS['sk_'];
        return "${$sk_($api_)}";
}
?>
如果你觉得雨滴资源网对你有帮助的话,可以小小的打赏一下小站,用于维持本站的运营!

本文标签:

版权声明:雨滴资源网内容来源于互联网,如果有侵权内容、不妥之处,请第一时间联系我们删除。敬请谅解!

本文链接:芒果TV云视频解析 - https://www.yudzy.com/154.html

失效提示:此文更新于2018-9-14,如果文章内容或图片资源失效,请留言反馈,客服会及时处理,谢谢!