Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- class DownloadForm {
- public $links;
- public $username
- public $password
- public function processLinks($data){
- $data = explode(PHP_EOL, $data);
- foreach($data as $link){
- echo ' Processing link...: ' . $link;
- $command = 'wget ' . $link . ' --user=' . $username . ' --password=' . $password . ' --output-file=Download';
- shell_exec($command);
- echo ' :Sucess.';
- }
- }
- }
- if(isset($_POST["process"])) {
- echo 'About to process links...';
- $download_form = new DownloadForm();
- $download_form->processLinks($_POST["links"]);
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement