yditv.php挂了???
这个代码挂了???<?php
//http://127.0.0.1/yditv.php?channel-id=ystenlive&Contentid=1000000005000265001&playseek=20240815190000-20240815193000
error_reporting(0);
date_default_timezone_set("PRC");
$ts = $_GET['ts']??'';
if ($ts){
$decodedUts = urldecode($ts);
$tsa = explode('AuthInfo=',$decodedUts);
$authinfo = urlencode($tsa);
$decodedUts = $tsa.'AuthInfo='.$authinfo;
$data = get($decodedUts);
if ($data!==200){
$d = get($decodedUts);
} else {
$d = $data;
}
header('Content-Type: video/MP2T');
} else {
$u = $_GET['u']??'';
$https = isset($_SERVER['HTTPS'])?'https':'http';//当前请求的主机使用的协议。
$http_host = $_SERVER['HTTP_HOST'];//当前请求的主机名。
$requestUri = $_SERVER['REQUEST_URI'];//获取当前请求的 URI
$decodedUri = urldecode($requestUri);//URL解码
$Uripath = explode('?',$decodedUri);//strstr($decodedUri,'?',true);
if ($u){
$decodedU = urldecode($u);
$urlpath = explode('index.m3u8',$decodedU);
$urlp = "{$https}://{$http_host}{$Uripath}?ts=";
$m3u8 = get($decodedU);
if (strpos($m3u8,'EXTM3U')===false) $m3u8 = get($decodedU);
$m3u8s = explode("\n",trim($m3u8));
$d = '';
foreach($m3u8s as $m3u8l){
if (strpos($m3u8l,'ts')!==false){
$d .= $urlp.urlencode($urlpath.$m3u8l).PHP_EOL;
} else {
$d .= $m3u8l.PHP_EOL;
}
}
header("Content-Type: application/vnd.apple.mpegURL");
header("Content-Disposition: inline; filename=index.m3u8");
} else {
$channel_id = $_GET['channel-id']??'ystenlive';
$Contentid = $_GET['Contentid']??'8785669936177902664';
$playseek = $_GET['playseek']??'';
if ($playseek) {
$t_arr = str_split(str_replace('-','.0',$playseek).'.0',8);
$starttime = $t_arr.'T'.$t_arr.'0Z';
$endtime = $t_arr.'T'.$t_arr.'0Z';
$url1 = "http://gslbserv.itv.cmvideo.cn/index.m3u8?channel-id={$channel_id}&Contentid={$Contentid}&livemode=4&stbId=4&starttime={$starttime}&endtime={$endtime}";
} else {
$url1 = "http://gslbserv.itv.cmvideo.cn/index.m3u8?channel-id={$channel_id}&Contentid={$Contentid}&livemode=1&stbId=4";
}
$url2 = get($url1,1);
$url3 = urlencode($url2);
$url4 = "{$https}://{$http_host}{$Uripath}?u={$url3}";
header("location:$url4");
exit;
}
}
print_r($d);
exit;
function get($url,$tran=0) {
$host = [
"cache.ott.ystenlive.itv.cmvideo.cn:80:39.135.122.181",
"cache.ott.bestlive.itv.cmvideo.cn:80:39.135.122.181",
"cache.ott.wasulive.itv.cmvideo.cn:80:39.135.122.181",
"cache.ott.fifalive.itv.cmvideo.cn:80:39.135.122.181",
"cache.ott.hnbblive.itv.cmvideo.cn:80:39.135.122.181",
"cache.ott.ystenlive.itv.cmvideo.cn:80:39.134.142.148",
"cache.ott.bestlive.itv.cmvideo.cn:80:39.135.57.47",
"cache.ott.wasulive.itv.cmvideo.cn:80:39.136.135.241",
"cache.ott.fifalive.itv.cmvideo.cn:80:39.134.91.238",
"cache.ott.hnbblive.itv.cmvideo.cn:80:39.136.135.241",
"cache.ott.ystenlive.itv.cmvideo.cn:80:39.134.149.187",
"cache.ott.bestlive.itv.cmvideo.cn:80:39.137.24.22",
"cache.ott.wasulive.itv.cmvideo.cn:80:39.135.188.235",
"cache.ott.fifalive.itv.cmvideo.cn:80:39.135.188.237",
"cache.ott.hnbblive.itv.cmvideo.cn:80:39.134.16.115",
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
curl_setopt($ch, CURLOPT_RESOLVE, $host);
if($tran){
curl_setopt($ch, CURLOPT_MAXREDIRS, 2);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_exec($ch);
$data = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
} else {
$data = curl_exec($ch);
}
$data = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return $data;
}
?>
提示403 Forbidden{:4_88:} itv源挂了一批 换ip?域名解释 确实是挂了,报403错误,可惜了这个稳定源。 又被暴利弄挂了啊,可惜 stbid改下就好,博客有更新 Wheiss 发表于 2024-12-29 22:31
stbid改下就好,博客有更新
求分享下求分享下求分享下求分享下谢谢 Wheiss 发表于 2024-12-29 22:31
stbid改下就好,博客有更新
感谢!目前可以正常使用了!新年快乐!
页:
[1]