Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.         <title></title>
  6.     </head>
  7.     <body>
  8.         <?php
  9.         class DownloadForm {
  10.     public $links;
  11.     public $username
  12.     public $password
  13.    
  14.     public function processLinks($data){
  15.         $data = explode(PHP_EOL, $data);
  16.         foreach($data as $link){
  17.             echo '  Processing link...: ' . $link;
  18.             $command = 'wget ' . $link . ' --user=' . $username . ' --password=' . $password . ' --output-file=Download';
  19.             shell_exec($command);
  20.             echo ' :Sucess.';
  21.         }
  22.  
  23.     }
  24. }
  25.  
  26. if(isset($_POST["process"])) {
  27.     echo 'About to process links...';
  28.     $download_form = new DownloadForm();
  29.     $download_form->processLinks($_POST["links"]);
  30. }
  31.         ?>
  32.     </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement