This repository has been archived by the owner on Jan 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathstream.php
73 lines (57 loc) · 1.6 KB
/
stream.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
include "ip.php";
include "logincred.php";
$cont= 'http://'.$ip.'/token.php';
$p= @file_get_contents($cont);
if(@$_REQUEST["key"]!="")
{
$opts = [
"http" => [
"method" => "GET",
"header" => "User-Agent: JioTV\r\n" .
"lbcookie: 300\r\n" .
"devicetype: phone\r\n" .
"os: Android\r\n" .
"appkey: NzNiMDhlYzQyNjJm\r\n" .
"deviceId: 2f5f4c6443fe0800\r\n" .
"versionCode: 226\r\n" .
"osVersion: 9\r\n" .
"isott: true\r\n" .
"languageId: 6\r\n" .
"uniqueId: $uniqueid\r\n" .
"srno: 200206173037\r\n" .
"usergroup: tvYR7NSNn7rymo3F\r\n" .
"channelid: 472\r\n" .
"ssotoken: $ssoToken\r\n"
]
];
$cache=str_replace("/","_",$_REQUEST["key"]);
if(!file_exists($cache)){
$context = stream_context_create($opts);
$haystack = file_get_contents("https://tv.media.jio.com/streams_live/" . $_REQUEST["key"] . $p,false,$context);
}
else
{
$haystack=file_get_contents($cache);
}
echo $haystack;
}
if(@$_REQUEST["ts"]!="")
{
header("Content-Type: video/mp2t");
header("Connection: keep-alive");
header("Access-Control-Allow-Origin: *");
header("Access-Control-Expose-Headers: Content-Length,Content-Range");
header("Access-Control-Allow-Headers: Range");
header("Accept-Ranges: bytes");
$opts = [
"http" => [
"method" => "GET",
"header" => "User-Agent: plaYtv/5.3.2 (Linux;Android 5.1.1) ExoPlayerLib/2.3.0/2.3.0\r\n"
]
];
$context = stream_context_create($opts);
$haystack = file_get_contents("http://mumsite.cdnsrv.jio.com/jiotv.live.cdn.jio.com/" . $_REQUEST["ts"],false,$context);
echo $haystack;
}
?>