会飞的鱼

FS - RM
谁能反抗生命随波逐流的离合
首页 » 热门源码 » [PHP]芒果TV免费视频解析

[PHP]芒果TV免费视频解析

<?php
/*
吾爱破解
调试方法[仅支持芒果TV免费视频]:
[输出MP4] php?url=http://www.mgtv.com/b/317619/4070323.html
[输出M3U] php?url=http://www.mgtv.com/b/317619/4070323.html&type=m3u8
API通过F12抓包获取
*/
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 = 'http://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 = 'http://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_)}";
}
?>

文章如无特别注明均为原创! 作者: 浮生若梦, 转载或复制请以 超链接形式 并注明出处 浮生若梦's Blog
原文地址《 [PHP]芒果TV免费视频解析》发布于2017-9-16

分享到:
0 打赏

评论

切换注册

登录

您也可以使用第三方帐号快捷登录

Q Q 登 录
微 博 登 录
切换登录

注册