Advertisement
0xCor3

YTDL MASS

Jun 23rd, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.41 KB | None | 0 0
  1. <?php
  2. /* Created By 0xCor3 | Security Ghost */
  3. /* Change the Copyright didn't make you a coder */
  4. function curl_get($url){
  5.     $curl = curl_init();
  6.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  7.     curl_setopt($curl, CURLOPT_URL, $url);
  8.     curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)");
  9.     $cx = curl_exec($curl);
  10.     curl_close($curl);
  11.     return($cx);
  12. }
  13. ?>
  14. <h1 class="h1">Youtube Mass Downloader</h1>
  15. <form method="POST" action="">
  16.     <div class="panel panel-default">
  17.                 <div class="panel-heading paneltitle"><b>Youtube Downloader</b></div>
  18.                 <div class="panel-body">
  19.                     <div class="form-group">
  20.                         <div class="input-group">
  21.                             <span class="input-group-addon"><i class="fa fa-link"></i></span>
  22.                             <textarea class="form-control" type="url" name="link" rows="6" placeholder="https://www.youtube.com/watch?v=Sa0c1VGoiy" required=""><?php echo $_POST['link']; ?></textarea>
  23.                         </div>
  24.                     </div>
  25.                     <div class="form-group">
  26.                         <div class="input-group">
  27.                             <span class="input-group-addon">Type :</span>
  28.                             <select class="custom-select form-control" name="quality">
  29.                                 <option selected disabled>Select Quality</option>
  30.                                 <option value="720">720p</option>
  31.                                 <option value="360">360p</option>
  32.                                 <option value="240">240p</option>
  33.                                 <option value="144">144p</option>
  34.                                 <option value="mp3">mp3</option>
  35.                             </select>
  36.                         </div>
  37.                     </div>
  38.                     <button type="submit" name="dl" class="btn btn-primary btn-md form-control">Download</button>
  39.                     <?php
  40.                         if(isset($_POST['dl'])){
  41.                             echo "<hr>";
  42.                             $ytlink = $_POST['link'];
  43.                             $quality = $_POST['quality'];
  44.                             $e = explode("\r\n", $ytlink);
  45.                             echo '<div class="form-group">
  46.                                <ul class="list-group">';
  47.                             foreach($e as $l){
  48.                                 $c = curl_get("https://api.zeldin.xyz/v1/yt.php?link=".$l."&key=37bc2f75bf1bcfe8450a1a41c200364c&quality=".$quality);
  49.                                 $s = explode("<br>", $c);
  50.                                 $title = $s[0];
  51.                                 $dlink = $s[1];
  52.                                 $size = $s[2];
  53.                                 $no = 1;
  54.                                 if($dlink){ ?>
  55.                                      <li class="list-group-item"><?php echo $title;?> [ <?php echo $size; ?> ]<a href="<?php echo $dlink; ?>" class="btn btn-danger btn-xs pull-right">Download</a></li>
  56.                                <?php }else{
  57.                                     echo "Failed Lel <br>";
  58.                                 }
  59.                                 }
  60.                             echo '</ul>
  61.                            </div>';
  62.                         }
  63.                     ?>
  64.                 </div>
  65.     </div>
  66. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement