Guest User

Untitled

a guest
Oct 10th, 2024
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 5.0.1.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.04.2022
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function getOutputFormats($rFormats)
  15. {
  16. $rFormatArray = [1 => 'm3u8', 2 => 'ts', 3 => 'rtmp'];
  17. $rReturn = [];
  18.  
  19. foreach ($rFormats as $rFormat) {
  20. $rReturn[] = $rFormatArray[$rFormat];
  21. }
  22.  
  23. return $rReturn;
  24. }
  25.  
  26. function shutdown()
  27. {
  28. global $rDeny;
  29.  
  30. if ($rDeny) {
  31. XCMS::checkFlood();
  32. }
  33.  
  34. if (is_object(XCMS::$db)) {
  35. XCMS::$db->close_mysql();
  36. }
  37. }
  38.  
  39. register_shutdown_function('shutdown');
  40. require './stream/init.php';
  41. set_time_limit(0);
  42.  
  43. if (XCMS::$rSettings['force_epg_timezone']) {
  44. date_default_timezone_set('UTC');
  45. }
  46.  
  47. $rDeny = true;
  48.  
  49. if (XCMS::$rSettings['disable_player_api']) {
  50. $rDeny = false;
  51. generateError('PLAYER_API_DISABLED');
  52. }
  53.  
  54. $rPanelAPI = false;
  55.  
  56. if (strtolower(explode('.', ltrim(parse_url($_SERVER['REQUEST_URI'])['path'], '/'))[0]) == 'panel_api') {
  57. if (!XCMS::$rSettings['legacy_panel_api']) {
  58. $rDeny = false;
  59. generateError('LEGACY_PANEL_API_DISABLED');
  60. }
  61. else {
  62. $rPanelAPI = true;
  63. }
  64. }
  65.  
  66. $rIP = $_SERVER['REMOTE_ADDR'];
  67. $rUserAgent = trim($_SERVER['HTTP_USER_AGENT']);
  68. $rOffset = (empty(XCMS::$rRequest['params']['offset']) ? 0 : abs((int) XCMS::$rRequest['params']['offset']));
  69. $rLimit = (empty(XCMS::$rRequest['params']['items_per_page']) ? 0 : abs((int) XCMS::$rRequest['params']['items_per_page']));
  70. $rNameTypes = ['live' => 'Live Streams', 'movie' => 'Movies', 'created_live' => 'Created Channels', 'radio_streams' => 'Radio Stations', 'series' => 'TV Series'];
  71. $rDomainName = XCMS::getDomainName();
  72. $rDomain = parse_url($rDomainName)['host'];
  73. $rValidActions = [0 => 'get_epg', 200 => 'get_vod_categories', 201 => 'get_live_categories', 202 => 'get_live_streams', 203 => 'get_vod_streams', 204 => 'get_series_info', 205 => 'get_short_epg', 206 => 'get_series_categories', 207 => 'get_simple_data_table', 208 => 'get_series', 209 => 'get_vod_info'];
  74. $rOutput = [];
  75. $rAction = (!empty(XCMS::$rRequest['action']) && (in_array(XCMS::$rRequest['action'], $rValidActions) || array_key_exists(XCMS::$rRequest['action'], $rValidActions)) ? XCMS::$rRequest['action'] : '');
  76.  
  77. if (isset($rValidActions[$rAction])) {
  78. $rAction = $rValidActions[$rAction];
  79. }
  80. if ($rPanelAPI && empty($rAction)) {
  81. $rGetChannels = true;
  82. }
  83. else {
  84. $rGetChannels = in_array($rAction, ['get_series' => true, 'get_vod_streams' => true, 'get_live_streams' => true]);
  85. }
  86.  
  87. if ($rGetChannels) {
  88. XCMS::$rBouquets = XCMS::getCache('bouquets');
  89. }
  90. if (($rPanelAPI && empty($rAction)) || in_array($rAction, ['get_vod_categories' => true, 'get_series_categories' => true, 'get_live_categories' => true])) {
  91. XCMS::$rCategories = XCMS::getCache('categories');
  92. }
  93.  
  94. $rExtract = ['offset' => $rOffset, 'items_per_page' => $rLimit];
  95. if (isset(XCMS::$rRequest['username']) && isset(XCMS::$rRequest['password'])) {
  96. $rUsername = XCMS::$rRequest['username'];
  97. $rPassword = XCMS::$rRequest['password'];
  98. .....................................................................
  99. ............................................
  100. ......................
Advertisement
Add Comment
Please, Sign In to add comment