Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. set_time_limit(0);
  15. require_once 'config.php';
  16. require_once ABSPATH . '/firewall.php';
  17. ob_end_clean();
  18. session_write_close();
  19. $slug = $var->get->slug;
  20. $videos = $db->query("SELECT id,link,slug,source FROM files WHERE slug='" . $slug . "'");
  21.  
  22. if ($videos->num_rows != '1') {
  23. ERROR_404();
  24. }
  25.  
  26. $links = $db->query("SELECT * FROM links WHERE uid='" . $var->get->uid . "'");
  27.  
  28. if ($links->num_rows != '1') {
  29. ERROR_404();
  30. }
  31.  
  32. $link = $links->fetch_object();
  33. $video = $videos->fetch_object();
  34. $data = json_decode($link->data);
  35.  
  36. if ($link->type == 'video_download' && $var->session('fingerprint') != $var->get->sid) {
  37. ERROR_404();
  38. }
  39.  
  40. $source = $data->sources->{$var->get->quality}->file;
  41.  
  42. if (!empty($source)) {
  43. $source = get_video($data);
  44. $headers = $source['headers'];
  45. $db->close();
  46. header($headers[0]);
  47. header('Devloped-By: JuicyCodes.Com');
  48.  
  49. if (http_response_code() != '403') {
  50. if ($link->type == 'video_download') {
  51. header('Pragma: public');
  52. header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  53. header('Content-Disposition: attachment; filename="video_' . $var->get->quality . 'p.mp4"');
  54. }
  55.  
  56. if (isset($headers['Content-Type'])) {
  57. header('Content-Type: ' . $headers['Content-Type']);
  58. }
  59.  
  60. if (isset($headers['Content-Length'])) {
  61. header('Content-Length: ' . $headers['Content-Length']);
  62. }
  63.  
  64. if (isset($headers['Accept-Ranges'])) {
  65. header('Accept-Ranges: ' . $headers['Accept-Ranges']);
  66. }
  67.  
  68. if (isset($headers['Content-Range'])) {
  69. header('Content-Range: ' . $headers['Content-Range']);
  70. }
  71.  
  72. $fp = fopen($source['link'], 'rb');
  73.  
  74. while (!feof($fp)) {
  75. echo fread($fp, 1024 * 1024 * IT\Data::Get('chunk_size'));
  76. flush();
  77. ob_flush();
  78. }
  79. fclose($fp);
  80. } else {
  81. ERROR_404();
  82. }
  83. } else {
  84. ERROR_404();
  85. }
  86.  
  87. function get_video($data)
  88. {
  89. global $db;
  90. global $var;
  91. global $link;
  92. global $video;
  93. global $reloads;
  94. $source = $data->sources->{$var->get->quality}->file;
  95. $cookies = implode('; ', $data->cookies);
  96. $options = array('http' => array('header' => set_headers($cookies)));
  97. stream_context_set_default($options);
  98. $headers = get_headers($source, true);
  99.  
  100. if (isset($headers['Location'])) {
  101. if (is_array($headers['Location'])) {
  102. $headers['Location'] = end($headers['Location']);
  103. }
  104.  
  105. $source = $headers['Location'];
  106. $headers = get_headers($source, true);
  107. .........................................................................
  108. ......................................
  109. ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement