Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.91 KB | None | 0 0
  1. <?php
  2.  
  3. //NOTE: this requires a place to write the file that's writable by the webserver user.
  4. //It's currently set to use a /tmp subdir in the current working directory; change
  5. //this if needed. Ensure the directory exists too!
  6.  
  7. $downloadErr = "";
  8.  
  9. $action=$_REQUEST['action'];
  10.    
  11. $username=$_REQUEST['name'];
  12. $password=$_REQUEST['pass'];
  13.  
  14. $target="http://plexdreams.xyz:6562/get.php?username=" . $username . "&password=" . $password . "&type=m3u_plus&output=ts";
  15.  
  16. $output=file_get_contents($target);
  17. file_put_contents("./tmp/playlist.m3u8", $output);  
  18.  
  19. if (filesize('./tmp/playlist.m3u8') > 0)
  20.     {
  21.     header('Content-Type: application/octet-stream');
  22.     header('Content-Disposition: attachment; filename="vlc_playlist.m3u8"');
  23.     readfile($target);    
  24.     }
  25.     else
  26.     {
  27.     if (!empty($_POST))
  28.         {
  29.         $downloadErr="Please check your login details.";
  30.         }
  31.     }  
  32. unlink('./tmp/playlist.m3u8');
  33. ?>
  34.  
  35. <link rel='stylesheet' id='follow-up-emails-css'  href='https://oober.tv/wp-content/plugins/woocommerce-follow-up-emails/templates/followups.css' type='text/css' media='all' />
  36. <link rel='stylesheet' id='woocommerce-layout-css'  href='//oober.tv/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css' type='text/css' media='all' />
  37. <link rel='stylesheet' id='woocommerce-general-css'  href='//oober.tv/wp-content/plugins/woocommerce/assets/css/woocommerce.css' type='text/css' media='all' />
  38. <link rel='stylesheet' id='xmas-advent-calendar-css'  href='https://oober.tv/wp-content/plugins/xmas-advent-calendar/public/css/xmas-advent-calendar-public.css' type='text/css' media='all' />
  39. <link rel='stylesheet' id='font-body-css'  href='https://fonts.googleapis.com/css?family=Open+Sans' type='text/css' media='screen, projection' />
  40. <link rel='stylesheet' id='style-fontawesome-css'  href='https://oober.tv/wp-content/themes/primashop-wc/style-fontawesome.min.css' type='text/css' media='screen, projection' />
  41. <link rel='stylesheet' id='style-theme-parent-css'  href='https://oober.tv/wp-content/themes/primashop-wc/style.css' type='text/css' media='all' />
  42. <link rel='stylesheet' id='style-theme-css'  href='https://oober.tv/wp-content/themes/my-primashop-wc/style.css' type='text/css' media='all' />
  43. <link rel='stylesheet' id='style-responsive-parent-css'  href='https://oober.tv/wp-content/themes/primashop-wc/style-responsive.css' type='text/css' media='all' />
  44. <link rel='stylesheet' id='style-responsive-css'  href='https://oober.tv/wp-content/themes/my-primashop-wc/style-responsive.css' type='text/css' media='all' />
  45.  
  46.  <form  action="" method="POST" enctype="multipart/form-data">
  47.  <input type="hidden" name="action" value="submit">
  48.  Your username:<br>
  49.  <input name="name" type="text" value="" size="30"/><br>
  50.  Your password:<br>
  51.  <input name="pass" type="text" value="" size="30"/><br>
  52.  <input type="submit" value="Generate playlist"/><br>
  53.  <?php echo $downloadErr;?>
  54.  </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement