Advertisement
smallkan

Untitled

Jan 24th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Teste</title>
  5. <link rel="stylesheet" href="https://cdn.plyr.io/3.4.7/plyr.css">
  6.  
  7. <style type="text/css">
  8. /* This is purely for the demo */
  9. .container {
  10. max-width: 800px;
  11. margin: 0 auto;
  12. }
  13. .plyr {
  14. border-radius: 4px;
  15. margin-bottom: 15px;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <script src="https://cdn.plyr.io/3.4.6/plyr.js"></script>
  21. <script type="text/javascript">
  22. document.addEventListener('DOMContentLoaded', () => {
  23. // This is the bare minimum JavaScript. You can opt to pass no arguments to setup.
  24. const player = new Plyr('#player');
  25.  
  26. // Expose
  27. window.player = player;
  28.  
  29. // Bind event listener
  30. function on(selector, type, callback) {
  31. document.querySelector(selector).addEventListener(type, callback, false);
  32. }
  33.  
  34. // Play
  35. on('.js-play', 'click', () => {
  36. player.play();
  37. });
  38.  
  39. // Pause
  40. on('.js-pause', 'click', () => {
  41. player.pause();
  42. });
  43.  
  44. // Stop
  45. on('.js-stop', 'click', () => {
  46. player.stop();
  47. });
  48.  
  49. // Rewind
  50. on('.js-rewind', 'click', () => {
  51. player.rewind();
  52. });
  53.  
  54. // Forward
  55. on('.js-forward', 'click', () => {
  56. player.forward();
  57. });
  58. });
  59. </script>
  60.  
  61. <?php
  62.  
  63. function getStrBetween($string,$start,$end){
  64. $string = explode($start, $string)[1];
  65. return explode($end, $string)[0];
  66. }
  67.  
  68. $url = 'https://streamango.com/f/qqscetaoknnrnqsa/zoids-wild-001_mp4'; //streamango OR fruitstreams OR streamcherry URL
  69.  
  70. $ch = curl_init();
  71. curl_setopt($ch, CURLOPT_URL, $url);
  72. curl_setopt($ch, CURLOPT_HEADER, 0);
  73. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  74. $data = curl_exec($ch);
  75. curl_close($ch);
  76.  
  77. $data = rawurldecode($data);
  78.  
  79. $temp = getStrBetween($data,'src:d(','height');
  80.  
  81. $key1 = getStrBetween($temp,'\'','\'');
  82.  
  83. $key2 = getStrBetween($temp,'\',',')');
  84.  
  85. $title = getStrBetween($data,'<meta name="og:title" content="', '">');
  86.  
  87. $thumbnail = getStrBetween($data,'poster="', '"');
  88.  
  89. $subtitle = getStrBetween($data,'var suburl = "', '"');
  90. $subtitle = trim(str_replace('\/', '/', $subtitle));
  91.  
  92. echo "Título: " . $title . "<br/><br/>" . "Thumbnail: " . $thumbnail . "<br/><br/>" . "Legenda: " . $subtitle . "<br/><br/>";
  93. ?>
  94.  
  95. <div class="container">
  96. <center><?php echo $title; ?></center>
  97. <script>
  98.  
  99. function getStreamUrl(hashCode, intVal) {
  100. let chars = "=/+9876543210zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA";
  101. let retVal = '';
  102. hashCode = hashCode.replace(/[^A-Za-z0-9\+\/\=]/g, '');
  103. for (let hashIndex = 0; hashIndex < hashCode.length; hashIndex += 4) {
  104. let hashCharCode_0 = chars.indexOf(hashCode.charAt(hashIndex));
  105. let hashCharCode_1 = chars.indexOf(hashCode.charAt(hashIndex + 1));
  106. let hashCharCode_2 = chars.indexOf(hashCode.charAt(hashIndex + 2));
  107. let hashCharCode_3 = chars.indexOf(hashCode.charAt(hashIndex + 3));
  108. retVal = retVal + String.fromCharCode(((hashCharCode_0 << 0x2) | (hashCharCode_1 >> 0x4)) ^ intVal);
  109. if (hashCharCode_2 != 0x40) {
  110. retVal = retVal + String.fromCharCode(((hashCharCode_1 & 0xf) << 0x4) | (hashCharCode_2 >> 0x2));
  111. }
  112. if (hashCharCode_3 != 0x40) {
  113. retVal = retVal + String.fromCharCode(((hashCharCode_2 & 0x3) << 0x6) | hashCharCode_3);
  114. }
  115. }
  116. return retVal;
  117. }
  118.  
  119. var keyNum1 = "<?php echo $key1;?>";
  120. var keyNum2 = "<?php echo $key2;?>";
  121.  
  122. document.write('Link do vídeo: ' + 'https:' + getStreamUrl(keyNum1, keyNum2));
  123.  
  124. var httpei = "https:";
  125. var stream = getStreamUrl(keyNum1, keyNum2);
  126.  
  127. // Montando o player
  128. document.write('<video controls data-plyr-config="{ "title": "<?php echo $title ?>", focused: true, global: true }" playsinline id="player">');
  129. document.write('<source type="video/mp4" src="go.php?url=' + httpei + stream +' ">');
  130. document.write('</video>');
  131.  
  132. </script>
  133. </div>
  134. </body>
  135. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement