Advertisement
Th3-822

[rapidleech][d] idup_in

Oct 18th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.     require_once('index.html');
  5.     exit();
  6. }
  7.  
  8. if (!file_exists(HOST_DIR . 'download/GenericXFS_DL.php')) html_error('Cannot load "'.htmlentities(HOST_DIR).'download/GenericXFS_DL.php" (File doesn\'t exists)');
  9. require_once(HOST_DIR . 'download/GenericXFS_DL.php');
  10.  
  11. class idup_in extends GenericXFS_DL {
  12.     public $pluginVer = 6;
  13.     public function Download($link) {
  14.         $this->wwwDomain = false; // Switch to true if filehost forces it's domain with www.
  15.         $this->cname = 'xfss'; // Session cookie name
  16.         $this->sslLogin = false; // Force https on login.
  17.         $this->embedDL = true; // Try to unpack player's js for finding download link. (Only hosts with video player)
  18.         $this->unescaper = false; // Enable JS unescape decoder.
  19.  
  20.         $this->Start($link);
  21.     }
  22.  
  23.     protected function getFileName($url) {
  24.         $fname = parent::getFileName($url);
  25.         if (preg_match("@^(?:v(?:ideo)|{$this->fid})?\.(mp4|flv)$@i", $fname, $vExt) && preg_match('@Filename:?\s*<b>\s*([^\s<>\"\']+)\s*</b>@i', $this->page, $title)) {
  26.             $fname = preg_replace('@\.(mp4|flv|mkv|webm|wmv|(m2)?ts|rm(vb)?|mpe?g?|vob|avi|[23]gp)$@i', '', trim($title[1])) . '_S.' . strtolower($vExt[1]);
  27.         }
  28.         return $fname;
  29.     }
  30. }
  31.  
  32. // Written by Th3-822.
  33.  
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement