-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDRM.php
More file actions
52 lines (39 loc) · 1.61 KB
/
DRM.php
File metadata and controls
52 lines (39 loc) · 1.61 KB
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
<?php
// [ Update Your Values In Line No 19 and 20 Acces Token and Autorization ]
// URL also May Be Get Change 🥱😆
// (c) @AviPatilPro GitHub
$curl = curl_init();
$channel =$_GET['c'];
$url="https://spapi.zee5.com/singlePlayback/getDetails?channel_id=$channel&device_id=o6MhX3zFu1lGHBKrR2uW000000000000&platform_name=desktop_web&translation=en&user_language=en,hi,mr&country=IN&state=MH&app_version=2.50.50&user_type=guest&check_parental_control=false&ppid=o6MhX3zFu1lGHBKrR2uW000000000000&version=12";
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"x-access-token": "PUT_ACCESS_TOKEN",
"Authorization": "PUT_AUTHENTICATION_BEARER"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
$zx = json_decode($response, true);
$image= $zx["assetDetails"]['image_url'];
$img = str_replace('270x152', '1170x658', $image);
$title= $zx["assetDetails"]['title'];
$playit= $zx["keyOsDetails"]['video_token'];
header("Content-Type: application/json");
$errr= array("error" => "Put Here Only ZEE5 Proper URL , Invalid Input " );
$err =json_encode($errr);
$apii = array("title" => $title, "image" => $img, "url" => $playit, "created_by" => "Avishkar Patil");
$api =json_encode($apii, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
header("Content-Type: application/json");
echo $api;
?>