-
Notifications
You must be signed in to change notification settings - Fork 0
/
playlist.php
49 lines (48 loc) · 1.52 KB
/
playlist.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
<?php
header("Content-Type: application/vnd.apple.mpegurl");
echo '#EXTM3U x-tvg-url="https://github.com/mitthu786/tvepg/releases/download/latest/epg.xml.gz"' . PHP_EOL;
echo "<br>" . PHP_EOL;
$json = json_decode(file_get_contents('assets/data/channels.json') , true);
$LANG_MAP = array(
6 => "English",
1 => "Hindi",
2 => "Marathi",
3 => "Punjabi",
4 => "Urdu",
5 => "Bengali",
7 => "Malayalam",
8 => "Tamil",
9 => "Gujarati",
10 => "Odia",
11 => "Telugu",
12 => "Bhojpuri",
13 => "Kannada",
14 => "Assamese",
15 => "Nepali",
16 => "French"
);
$GENRE_MAP = array(
8 => "Sports",
5 => "Entertainment",
6 => "Movies",
12 => "News",
13 => "Music",
7 => "Kids",
9 => "Lifestyle",
10 => "Infotainment",
15 => "Devotional",
16 => "Business",
17 => "Educational",
18 => "Shopping",
19 => "JioDarshan"
);
foreach ($json['result'] as $channel)
{
$target = $channel['logoUrl'];
$targetnew = trim($target,".png");
printf("#EXTINF:-1 tvg-id=\"%u\" group-title=\"%s\" tvg-language=\"%s\" tvg-logo=\"http://jiotv.catchup.cdn.jio.com/dare_images/images/%s\",%s" . PHP_EOL, $channel['channel_id'], $GENRE_MAP[$channel['channelCategoryId']], $LANG_MAP[$channel['channelLanguageId']], $channel['logoUrl'], $channel['channel_name']);
echo "<br>" . PHP_EOL;
printf("http://%s/jiotvweb/autoq.php?c=%s" . PHP_EOL . PHP_EOL, $_SERVER['HTTP_HOST'], $targetnew);
echo "<br>" . PHP_EOL;
}
?>