Haagentus commited on
Commit
32d3438
·
1 Parent(s): d7a4907

Update index.php

Browse files
Files changed (1) hide show
  1. index.php +4 -18
index.php CHANGED
@@ -1,20 +1,6 @@
1
  <?php
2
  date_default_timezone_set("Asia/Shanghai");
3
- $channel = empty($_GET['id']) ? "ylpdhd/4000000" : trim($_GET['id']);
4
- $array = explode("/", $channel);
5
- //$stream = "http://113.250.21.179/liveplay-kk.rtxapp.com/live/program/live/{$array[0]}/{$array[1]}/";
6
- $stream = "http://223.111.117.11/liveplay-kk.rtxapp.com/live/program/live/{$array[0]}/{$array[1]}/";
7
- $timestamp = substr(time(), 0, 9) - 7;
8
- $current = "#EXTM3U" . "\r\n";
9
- $current .= "#EXT-X-VERSION:3" . "\r\n";
10
- $current .= "#EXT-X-TARGETDURATION:3" . "\r\n";
11
- $current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . "\r\n";
12
- for ($i = 0; $i < 3; $i++) {
13
- $timematch = $timestamp . '0';
14
- $timefirst = date('YmdH', $timematch);
15
- $current .= "#EXTINF:3," . "\r\n";
16
- $current .= $stream . $timefirst . "/" . $timestamp . ".ts" . "\r\n";
17
- $timestamp = $timestamp + 1;
18
- }
19
- header("Content-Disposition: attachment; filename=playlist.m3u8");
20
- echo $current;
 
1
  <?php
2
  date_default_timezone_set("Asia/Shanghai");
3
+
4
+ $host = $_SERVER ['HTTP_HOST'];
5
+ $uri = str_ireplace("/onedrive","",$_SERVER["REQUEST_URI"]);
6
+ header("location:$uri");