-
Notifications
You must be signed in to change notification settings - Fork 31
/
metas.php
59 lines (57 loc) · 1.37 KB
/
metas.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
<?php
//includes
include 'zee5.php';
include 'sonyliv.php';
include 'mxplayer.php';
//Get Request Params
$catalog = getRequestParams();
setHeaders();
$get_id = explode(":",$catalog->id);
if ($get_id['0'] == "zee5") {
$cache_key = "meta_{$get_id['1']}";
$cache = cache_check($cache_key);
if ($cache['status']) {
echo $cache['data'];
}
else {
$fin = zee5_meta($get_id['1']);
$metas = generate_meta($fin);
$meta_final['meta'] = $metas;
$data = json_encode($meta_final,JSON_UNESCAPED_SLASHES);
cache_create($cache_key,$data,cache_meta_ttl);
echo $data;
}
}
elseif ($get_id['0'] == "sliv") {
$cache_key = "meta_{$get_id['1']}";
$cache = cache_check($cache_key);
if ($cache['status']) {
echo $cache['data'];
}
else {
$fin = liv_get_info_id($get_id['1']);
$metas = generate_meta($fin);
$meta_final['meta'] = $metas;
$data = json_encode($meta_final,JSON_UNESCAPED_SLASHES);
cache_create($cache_key,$data,cache_meta_ttl);
echo $data;
}
}
elseif ($get_id['0'] == "mx") {
$cache_key = "meta_{$get_id['1']}";
$cache = cache_check($cache_key);
if ($cache['status']) {
echo $cache['data'];
}
else {
$fin = mxplayer_get_meta($get_id['1']);
$metas = generate_meta($fin);
$meta_final['meta'] = $metas;
$data = json_encode($meta_final,JSON_UNESCAPED_SLASHES);
cache_create($cache_key,$data,cache_meta_ttl);
echo $data;
}
}
else
echo "null";
?>