-
Notifications
You must be signed in to change notification settings - Fork 46
/
tests.php
64 lines (48 loc) · 1.79 KB
/
tests.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
<?php
/* The following code generates the token for JioTV.
Use it only for personal use. Mail to the address below for support, if necessary.
Contributed by: [email protected]
*/
$jctBase = "cutibeau2ic";
$ssoToken =file_get_contents("tok.txt");
$uid =file_get_contents("uid.txt");
$crm =file_get_contents("crm.txt");
function tokformat($str)
{
$str= base64_encode(md5($str,true));
return str_replace("\n","",str_replace("\r","",str_replace("/","_",str_replace("+","-",str_replace("=","",$str)))));
}
function generateJct($st, $pxe)
{
global $jctBase;
return trim(tokformat($jctBase . $st . $pxe));
}
function generatePxe() {
return time() + 1000;
}
function generateSt() {
global $ssoToken;
return tokformat($ssoToken);
}
function generateToken() {
$st = generateSt();
$pxe = generatePxe();
$jct = generateJct($st, $pxe);
return "?jct=" . $jct . "&pxe=" . $pxe . "&st=" . $st;
}
$p= generateToken();
$url="https://tv.media.jio.com/streams_live/" . $_REQUEST["key"] . $p;
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'deviceId: aaaaaaaaaaaaaa','crmid: ' . $crm,'usergroup: tvYR7NSNn7rymo3F','versionCode: 219','userId: rilxxxxxxx','appkey: NzNiMDhlYzQyNjJm','uniqueId: ' . $uid,'devicetype: phone','os: android','srno: 11111111111','osVersion: 5.1.1','subscriberId: ' . $crm,'channelid: ' . @$_GET["id"],'lbcookie: 1','ssotoken: ' . $ssoToken,'User-Agent: plaYtv/5.8.3 (Linux;Android 5.1.1) ExoPlayerLib/2.8.0'));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_USERAGENT,'plaYtv/5.8.3 (Linux;Android 5.1.1) ExoPlayerLib/2.8.0');
$contents = curl_exec($ch);
if (curl_errno($ch)) {
$contents = '';
} else {
curl_close($ch);
}
echo $contents;
?>