四川卫视php
貌似这个也挂科,最近挂的太多了
<?php
error_reporting(0);
$id = isset($_GET['id'])?$_GET['id']:'scws';
$n = [
'scws' => 'sctv1',//四川卫视
'scjj' => 'sctv2',//四川经济
'scwhly' => 'sctv3',//四川文化旅游
'scxw' => 'sctv4',//四川新闻
'scyswy' => 'sctv5',//四川影视文艺
'scxkgw' => 'sctv6',//四川星空购物
'scfnet' => 'sctv7',//四川妇女儿童
'scxc' => 'sctv9',//四川乡村
'kbws' => 'kangba',//康巴卫视
];
$t=time();
$url = "https://gw.scgchc.com/app/v1/anti/getLiveSecret?streamName=%2Fhdlive%2F{$n[$id]}8f9fb5888dedbe0c6a1b%2F1.m3u8&txTime=".$t;
$Auth = "bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsiU0VSVklDRV9TQ0dDLURFTU8iXSwidXNlcl9pZCI6MTg1NDA2NjA5ODE5MTk1ODAxOCwic2NvcGUiOlsiYWxsIl0sImV4cCI6MTczMTQ4MzU3OSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BUFBfQ0xJRU5UX1VTRVIiXSwianRpIjoiNjIyNmU3MDEtMDQ2Ni00MDExLWJhNDQtMGU0MzE4N2EzYTAwIiwiY2xpZW50X2lkIjoiU0VSVklDRV9TQ0dDLUFQUCJ9.eD5Q9zhAT3xwIn-MUNX1cqpMbH2OVhK6sfc6nagl-ESrwpujRMqXIrZWmQJzQBfJW-3Oc55X4Ay-gR_FsIfbSNLoqrv5pOlpTJDV74N1eAU-DGUTGH8nN0AzgxY7YV3GxYqmpjCDWIU9zNNzGDDmbMqL_C8KGvNaBRDk183XicaFLkdEpUX5DXp7PuiFK3MSlTp2ZgUwk6vINFsFfNqOV7Tg5ShrkDzfDT4bdtaihK5Vtj4FfCFoeVcYLuVuSuNT6ky5uTeak_cX9ODFfDeUjLfBf1ylpcDYiUgR-h8Q0g-oUpyI-4bpZE079xwethQz70GeLTeG5NGSngmTkj3hag";//登录四川 电视台https://www.sctv.com/watchTV,获取Authorization
$h = ["Authorization:".$Auth,"Referer: https://www.sctv.com/"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER,$h);
$data = curl_exec($ch);
curl_close($ch);
$auth = json_decode($data,1)["data"]["secret"];
$playurl = "https://tvshow.scgchc.com/hdlive/{$n[$id]}8f9fb5888dedbe0c6a1b/1.m3u8?".$auth;
header('Content-Type: application/vnd.apple.mpegurl');
header('location:'.$playurl);
echo $playurl;
/*
Authorization获取方法:
1.输入手机号登录;
2.点击浏览器菜单"工具"->"开发者工具",找到"Network";
3.刷新页面;
4.在"开发者工具"左窗口"Name"下找到"https://gw.scgchc.com/app/v1/anti/getLiveSecret?streamName=%2Fhdlive%2Fsctv18f9fb5888dedbe0c6a1b%2F1.m3u8&txTime=xxxxxxxxx";
5.在"开发者工具"右窗口"Headers"下找到"authorization",将其复制粘贴到php代码中@@处。
注:貌视可用一周。
*/
?>
没挂,重新获取$Auth。 guoma 发表于 2024-11-7 15:30
没挂,重新获取$Auth。
获取的就是最新的auth发帖前十分钟获取新的 我第一次学习尝试,注册,获取AUTH,电脑浏览器访问提示403 Forbidden
You don't have permission to access the URL on this server.
denied by Referer ACL
Powered by Tengine
CDN Request Id: 701452aa173105819368
播放器不能播放 需要验证,代理切片 guoma 发表于 2024-11-9 12:07
需要验证,代理切片
老哥给分享一个呢
看看还能不能用,谢谢大佬!
页:
[1]