We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0502dca commit dbbef4bCopy full SHA for dbbef4b
codes/sxg.php
@@ -0,0 +1,17 @@
1
+<?php
2
+ $channel = empty($_GET['id']) ? "CCTV-xw_4000" : trim($_GET['id']);
3
+ $array = explode("_", $channel);
4
+ $stream = "蜀小果可用IP/vod.rxip.sc96655.com/live/8ne5i_sccn/{$array[0]}_hls_pull/8ne5i_sccn,{$array[0]}_hls_pull_{$array[1]}K/";
5
+ $timestamp = intval((time()-60)/6);
6
+ $current = "#EXTM3U"."\r\n";
7
+ $current.= "#EXT-X-VERSION:3"."\r\n";
8
+ $current.= "#EXT-X-TARGETDURATION:6"."\r\n";
9
+ $current.= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}"."\r\n";
10
+ for ($i=0; $i<6; $i++)
11
+ {
12
+ $current.= "#EXTINF:6,"."\r\n";
13
+ $current.= $stream.rtrim(chunk_split($timestamp, 3, "/"), "/").".ts"."\r\n";
14
+ $timestamp = $timestamp + 1;
15
+ }
16
+ header("Content-Type: text/plain");
17
+ echo $current;
0 commit comments