Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Teste</title>
- <link rel="stylesheet" href="https://cdn.plyr.io/3.4.7/plyr.css">
- <style type="text/css">
- /* This is purely for the demo */
- .container {
- max-width: 800px;
- margin: 0 auto;
- }
- .plyr {
- border-radius: 4px;
- margin-bottom: 15px;
- }
- </style>
- </head>
- <body>
- <script src="https://cdn.plyr.io/3.4.6/plyr.js"></script>
- <script type="text/javascript">
- document.addEventListener('DOMContentLoaded', () => {
- // This is the bare minimum JavaScript. You can opt to pass no arguments to setup.
- const player = new Plyr('#player');
- // Expose
- window.player = player;
- // Bind event listener
- function on(selector, type, callback) {
- document.querySelector(selector).addEventListener(type, callback, false);
- }
- // Play
- on('.js-play', 'click', () => {
- player.play();
- });
- // Pause
- on('.js-pause', 'click', () => {
- player.pause();
- });
- // Stop
- on('.js-stop', 'click', () => {
- player.stop();
- });
- // Rewind
- on('.js-rewind', 'click', () => {
- player.rewind();
- });
- // Forward
- on('.js-forward', 'click', () => {
- player.forward();
- });
- });
- </script>
- <?php
- function getStrBetween($string,$start,$end){
- $string = explode($start, $string)[1];
- return explode($end, $string)[0];
- }
- $url = 'https://streamango.com/f/qqscetaoknnrnqsa/zoids-wild-001_mp4'; //streamango OR fruitstreams OR streamcherry URL
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $data = curl_exec($ch);
- curl_close($ch);
- $data = rawurldecode($data);
- $temp = getStrBetween($data,'src:d(','height');
- $key1 = getStrBetween($temp,'\'','\'');
- $key2 = getStrBetween($temp,'\',',')');
- $title = getStrBetween($data,'<meta name="og:title" content="', '">');
- $thumbnail = getStrBetween($data,'poster="', '"');
- $subtitle = getStrBetween($data,'var suburl = "', '"');
- $subtitle = trim(str_replace('\/', '/', $subtitle));
- echo "Título: " . $title . "<br/><br/>" . "Thumbnail: " . $thumbnail . "<br/><br/>" . "Legenda: " . $subtitle . "<br/><br/>";
- ?>
- <div class="container">
- <center><?php echo $title; ?></center>
- <script>
- function getStreamUrl(hashCode, intVal) {
- let chars = "=/+9876543210zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA";
- let retVal = '';
- hashCode = hashCode.replace(/[^A-Za-z0-9\+\/\=]/g, '');
- for (let hashIndex = 0; hashIndex < hashCode.length; hashIndex += 4) {
- let hashCharCode_0 = chars.indexOf(hashCode.charAt(hashIndex));
- let hashCharCode_1 = chars.indexOf(hashCode.charAt(hashIndex + 1));
- let hashCharCode_2 = chars.indexOf(hashCode.charAt(hashIndex + 2));
- let hashCharCode_3 = chars.indexOf(hashCode.charAt(hashIndex + 3));
- retVal = retVal + String.fromCharCode(((hashCharCode_0 << 0x2) | (hashCharCode_1 >> 0x4)) ^ intVal);
- if (hashCharCode_2 != 0x40) {
- retVal = retVal + String.fromCharCode(((hashCharCode_1 & 0xf) << 0x4) | (hashCharCode_2 >> 0x2));
- }
- if (hashCharCode_3 != 0x40) {
- retVal = retVal + String.fromCharCode(((hashCharCode_2 & 0x3) << 0x6) | hashCharCode_3);
- }
- }
- return retVal;
- }
- var keyNum1 = "<?php echo $key1;?>";
- var keyNum2 = "<?php echo $key2;?>";
- document.write('Link do vídeo: ' + 'https:' + getStreamUrl(keyNum1, keyNum2));
- var httpei = "https:";
- var stream = getStreamUrl(keyNum1, keyNum2);
- // Montando o player
- document.write('<video controls data-plyr-config="{ "title": "<?php echo $title ?>", focused: true, global: true }" playsinline id="player">');
- document.write('<source type="video/mp4" src="go.php?url=' + httpei + stream +' ">');
- document.write('</video>');
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement