Update index.php
Browse files
index.php
CHANGED
@@ -1,21 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
$
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
$
|
11 |
-
$
|
12 |
-
$
|
13 |
-
$
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
$current .= $stream . rtrim(chunk_split($timestamp, 3, "/"), "/") . ".ts" . "\r\n";
|
18 |
-
$timestamp = $timestamp + 1;
|
19 |
-
}
|
20 |
-
header("Content-Disposition: attachment; filename=index.m3u8");
|
21 |
-
echo $current;
|
|
|
1 |
<?php
|
2 |
+
|
3 |
+
//http://39.134.24.162/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3221225804/1.m3u8
|
4 |
+
$ou =isset($_GET['ou'])?$_GET['ou']:'2';
|
5 |
+
$cid = $_GET['id'];
|
6 |
+
$url = 'http://39.134.24.16'.$ou.'/dbiptv.sn.chinamobile.com/PLTV/88888888/224/322122'.$cid.'/1.m3u8';
|
7 |
+
$curl = curl_init();
|
8 |
+
curl_setopt($curl, CURLOPT_URL, $url);
|
9 |
+
curl_setopt($curl, CURLOPT_TIMEOUT, 2);
|
10 |
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
11 |
+
$data = curl_exec($curl);
|
12 |
+
curl_close($curl);
|
13 |
+
$data = preg_replace('/(\d+-\d+-\d+)(.hls.ts)/', 'http://39.134.24.16'.$ou.'/dbiptv.sn.chinamobile.com/PLTV/88888888/224/322122'.$cid.'/$1$2', $data);
|
14 |
+
echo $data;
|
15 |
+
header("Content-Disposition: attachment; filename=欧歌.m3u8");
|
16 |
+
?>
|
|
|
|
|
|
|
|
|
|