2024年12月最新虎牙代理源码再优化 不断流

2024-12-24 86 0

代码来源论坛的guoma 

2024年12月24日09:45:31测试 正常可用 不断流

<?php

error_reporting(0);

$id = $_GET['id'];//房间号(lProfileRoom)

if (empty($_GET['id'])) $id ="11342412";

$c = ['tx','hw','hs','hy'];

$c_rand  = $c[array_rand($c)];

$n = [0,1,2,3];

$n_rand  = $n[array_rand($n)];

$roomurl = "https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid=$id";

$json = json_decode(file_get_contents($roomurl),1);

$data = $json["data"];

$uid = $data['profileInfo']['uid'];

$streamname = $data['stream']['baseSteamInfoList'][0]['sStreamName'];

$url = $data['stream']['flv']['multiLine'][$n_rand]['url'];

$burl = explode('?', $url)[0];

$fm = "DWq8BcJ3h6DJt6TY_$0_$1_$2_$3";

$seqid = strval(intval($uid) + intval(microtime(true) * 1000));

$ctype = 'tars_wap';

$t = '102';    

$ss = md5("{$seqid}|{$ctype}|{$t}");

$wsTime = dechex(time() + 21600);

$fm = str_replace(["$0", "$1", "$2", "$3"], [$uid, $streamname, $ss, $wsTime], $fm);

$wsSecret = md5($fm);

$s = [];

$s["wsSecret"] = $wsSecret;

$s["wsTime"] = $wsTime;

$s["ctype"] = $ctype;

$s["seqid"] = $seqid;

$s["uid"] = $uid;

$s["fs"] = "bgct";

$s["ver"] = "1";

$s["t"] = $t;

$p = http_build_query($s);

$playurl = $burl.'?'.$p;

header("location:".$playurl);

//print_r($playurl);

?>

相关文章

WIN10许可证到期 激活批处理
河南联通内网专用单播和组播源
批量图片或PDF A3试卷分割为A4 离线html代码
Intel AC3160 AC3165等无线网卡 无法搜索连接WIFI6的解决方案
GitUI官网下载 汉化教程
随机图片随机轮播壁纸的api接口地址合集

发布评论