本帖最后由 fanmingming 于 2023-9-9 19:33 编辑
<?php
date_default_timezone_set('Asia/Shanghai');
$ip = $_GET['ip'];
$id = $_GET['id'] ?? 'cctv1hd8m/8000000';
$date = date('YmdH');
$timestamp = intval((time() - 50) / 10);
$stream = "http://{$domain}/live/program/live/{$id}/{$date}/";
$current = "#EXTM3U" . PHP_EOL;
$current .= "#EXT-X-VERSION:3" . PHP_EOL;
$current .= "#EXT-X-TARGETDURATION:3" . PHP_EOL;
$current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . PHP_EOL;
for ($i = 0; $i < 3; $i++) {
$current .= "#EXTINF:10.000," . PHP_EOL;
$current .= $stream . $timestamp . ".ts" . PHP_EOL;
$timestamp = $timestamp + 1;
}
header("Content-Type: application/vnd.apple.mpegurl");
header("Content-Disposition: inline; filename=mnf.m3u8");
echo $current;
?>
参数:
ip=可用域名或前置IP+域名
id=频道ID
使用示例(链接随时失效):
海峡卫视, https://pi.0472.org/bst.php?ip=110.80.139.96/liveplay-kk.rtxapp.com&id=hxwshd4m/4000000
发帖注意事项
请勿胡乱发帖:https://www.right.com.cn/forum/thread-8307840-1-1.html
账户手机验证:https://www.right.com.cn/forum/home.php?mod=spacecp&ac=plugin&id=jzsjiale_sms:home
|