石狮新闻综合 PHP 更新
本帖最后由 jiteloozz 于 2025-2-8 15:02 编辑根据坛友提示,做一更新。
播放地址目前为静态:
http://live-new.chinashishi.net/SSTV/sd/live.m3u8
<?php
header("Content-type:text/json;charset=utf-8");
$header = array(
'Referer: https://www.chinashishi.net/',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36',
);
//$html = get_data('https://www.chinashishi.net/folder113/folder120/',$header);
$sort_id = '652437194941669376';
$app_secret = '5c03f9843fa239c14b52222e83098919';
//$info = get_data('https://mapi-new.chinashishi.net/cloudlive-manage-mapi/api/topic/list?sort_id=652437194941669376&app_secret=5c03f9843fa239c14b52222e83098919&offset=0&count=6',$header);
$topic_id = '662611405685436416';
$date = date('Y-m-d');
$url = 'https://mapi-new.chinashishi.net/cloudlive-manage-mapi/api/topic/program/list?date='.$date.'&topic_id='.$topic_id.'&app_secret='.$app_secret.'&company_id=492';
$data = get_data($url, $header);
foreach (json_decode($data)->result as $live){
if ($live->time_status == 1) {
$playurl = $live->m3u8;
break;
}
}
header('Location:'.$playurl);
function get_data($url,$header){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
好来看看吧 http://live-new.chinashishi.net/SSTV/sd/live.m3u8 看看吧看看吧 人生没有彩排,每天都是直播。
页:
[1]