Beispiel #1
0
 public function Download($link)
 {
     if ($_REQUEST['step'] == '1') {
         $post['captcha'] = $_POST['captcha'];
         $post['submit'] = 'Download';
         $dlink = urldecode($_POST['referer']);
         $cookie = urldecode($_POST['cookie']);
         $link = urldecode($_POST['link']);
         $FileName = basename(parse_url($dlink, PHP_URL_PATH));
         $this->RedirectDownload($dlink, $FileName, $cookie, $post, $link);
         exit;
     } else {
         $page = $this->GetPage($link);
         is_present($page, "File not found.");
         $cookie = CookiesToStr(GetCookiesArr($page));
         if (preg_match('%<a href="([^"]+)" class="ajax button button-devil">%', $page, $match)) {
             $free = "http://download.hellshare.com" . $match[1];
         }
         $page = $this->GetPage($free, $cookie, 0, $link . "\r\nX-Requested-With: XMLHttpRequest");
         is_present($page, "The server is under the maximum load.");
         is_present($page, "You exceeded your today's limit for free download. You can download only 1 files per 24 hours.");
         $postlink = str_replace("\\", "", cut_str($page, 'style=\\"margin-bottom:0\\" action=\\"', '\\" method=\\"POST\\">'));
         $caplink = str_replace("\\", "", cut_str($page, 'id=\\"captcha-img\\"src=\\"', '\\" \\/>'));
         $data = $this->DefaultParamArr($link, $cookie, $postlink);
         $data['step'] = '1';
         $this->EnterCaptcha($caplink, $data);
         exit;
     }
 }
Beispiel #2
0
 public function Download($link)
 {
     $cookie = array('langfil' => 'en');
     $page = $this->GetPage($link, $cookie);
     $cookie = GetCookiesArr($page, $cookie);
     // check redirect
     $rdc = 0;
     while (($redir = $this->ChkRedir($page)) && $rdc < 5) {
         $page = $this->GetPage($redir, $cookie);
         $cookie = GetCookiesArr($page, $cookie);
         $rdc++;
     }
     is_present($page, 'The video you have requested is not available');
     if (!preg_match('/mediaid:\'([^\']+)\'/', $page, $mid)) {
         html_error('Error[Media id not found!]');
     }
     $page = $this->GetPage("http://en.vidivodo.com/player/getxml?mediaid={$mid[1]}&publisherid=vidivodo&type=", $cookie, 0, 'http://en.vidivodo.com/swf/player/MediaPlayer.swf');
     $cookie = GetCookiesArr($page, $cookie);
     if (!preg_match('/https?:\\/\\/ss\\d+\\.vidivodo\\.com(:\\d+)?\\/vidivodo\\/vidservers\\/[^\\r\\n\\]]+/i', $page, $dl)) {
         html_error('Error[Download link not found!]');
     }
     $dlink = trim($dl[0]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie);
 }
Beispiel #3
0
 private function DownloadFree($link)
 {
     global $Referer;
     if ($_REQUEST['step'] == 'captcha') {
         $post["recaptcha_challenge_field"] = $_POST['recaptcha_challenge_field'];
         $post["recaptcha_response_field"] = $_POST['recaptcha_response_field'];
         $post["id"] = $_POST['id'];
         $cookie = urldecode($_POST['cookie']);
         $dlink = urldecode($_POST['link']);
         $FileName = $_POST['name'];
         $this->RedirectDownload($dlink, $FileName, $cookie, $post, $Referer);
         exit;
     } elseif ($_REQUEST['step'] == 'countdown') {
         $link = urldecode($_POST['link']);
         $cookie = StrToCookies(urldecode($_POST['cookie']));
         $page = $this->GetPage($link, $cookie, 0, $Referer);
     } else {
         $page = $this->GetPage($link);
         is_present($page, 'Requested file is deleted.');
         is_present($page, 'There is another download in progress from your IP. Please try to downloading later.');
         $cookie = GetCookiesArr($page);
         $FileName = trim(str_replace(" ", ".", cut_str($page, 'Download ', ',')));
         // first timer
         if (preg_match('/wf = (\\d+);/', $page, $wait)) {
             $this->CountDown($wait[1]);
         }
         if (preg_match("/u='(.+)'/", $page, $cap)) {
             $link = "http://www.crocko.com{$cap['1']}";
         }
         $page = $this->GetPage($link, $cookie, 0, $Referer);
     }
     //get new timer, then refresh the page
     if (preg_match("/w='(\\d+)'/", $page, $wait)) {
         if ($wait[1] > 100) {
             $data = $this->DefaultParamArr($link, $cookie);
             $data['step'] = 'countdown';
             $this->JSCountdown($wait[1], $data);
         } else {
             $this->CountDown($wait[1]);
             $page = $this->GetPage($link, $cookie, 0, $Referer);
         }
     }
     if (preg_match('%<form  method="post" action="([^"]+)">%', $page, $dl)) {
         $dlink = trim($dl[1]);
         if (!is_array($cookie)) {
             $cookie = StrToCookies($cookie, GetCookiesArr($page));
         } else {
             $cookie = GetCookiesArr($page, $cookie);
         }
         if (!preg_match('/Recaptcha\\.create\\("([^"]+)/i', $page, $cid)) {
             html_error('Can\'t find chaptcha id');
         }
         $data = $this->DefaultParamArr($dlink, $cookie);
         $data['step'] = 'captcha';
         $data['id'] = cut_str($page, 'name="id" value="', '"');
         $data['name'] = $FileName;
         $this->Show_reCaptcha($cid[1], $data);
         exit;
     }
 }
Beispiel #4
0
 private function login()
 {
     global $premium_acc;
     $url = 'http://www.slingfile.com/';
     $page = $this->GetPage($url . 'login');
     $this->cookie = GetCookiesArr($page);
     $pA = $_REQUEST["premium_user"] && $_REQUEST["premium_pass"] ? true : false;
     $user = $pA ? $_REQUEST["premium_user"] : $premium_acc["slingfile_com"]["user"];
     $pass = $pA ? $_REQUEST["premium_pass"] : $premium_acc["slingfile_com"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login Failed: Email or Password is empty. Please check login data.", 0);
     }
     $post = array();
     $post['f_user'] = $user;
     $post['f_password'] = $pass;
     $post['f_keepMeLoggedIn'] = '1';
     $post['submit'] = urlencode('Login &raquo;');
     $page = $this->GetPage($url . 'login', $this->cookie, $post, $url . 'login');
     $cookie = GetCookiesArr($page, $this->cookie);
     if (!array_key_exists('cookielogin', $cookie)) {
         html_error('Invalid account');
     }
     $page = $this->GetPage($url . 'dashboard', $cookie);
     is_notpresent($page, '<span>Premium</span>', 'Account is not premium!');
     return $cookie;
 }
Beispiel #5
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "This file no longer exists", 'Video not found or it was deleted.');
     is_present($page, "The file is being transfered", 'Video is temporarily unavailable.');
     if ($stepkey = cut_str($page, '"stepkey" value="', '"')) {
         $post = array('stepkey' => $stepkey, 'submit' => 'submit');
         $cookie = GetCookiesArr($page);
         $page = $this->GetPage($link, $cookie, $post);
     }
     if (!preg_match('@<h4>\\s*([^"<>]+)\\s*</h4>@i', $page, $fname)) {
         html_error('Error: Video title not found.');
     }
     if (!preg_match('@flashvars.domain="([^"]+)";\\s+flashvars.file="([^"]+)";\\s+flashvars.filekey=(?:"([^"]+)"|([\\$_A-Za-z][\\$\\w]*))@', $page, $matches)) {
         html_error('Error: Download link not found.');
     }
     if (empty($matches[3])) {
         if (!preg_match('@var\\s+' . $matches[4] . '\\s*=\\s*"([^"]+)"\\s*;@i', $page, $fkey)) {
             html_error('FileKey not Found.');
         }
         $matches[3] = $fkey[1];
     }
     $url = $matches[1] . '/api/player.api.php?user=undefined&codes=1&file=' . $matches[2] . '&pass=undefined&key=' . urlencode($matches[3]);
     $page2 = $this->GetPage($url);
     if (!preg_match('@url=(http://[^&]+)@', $page2, $downl)) {
         html_error('Error: Download link not found.');
     }
     if (!preg_match('@\\.[^\\.]+$@i', basename($downl[1]), $ext)) {
         $ext = array('.flv');
     }
     $fname = preg_replace('@\\.(mp4|flv|mkv|webm|wmv|(m2)?ts|rm(vb)?|mpe?g?|vob|avi|[23]gp)$@i', '', str_replace(array("\\", "/", ":", "*", "?", "\"", "<", ">", "|"), "_", html_entity_decode(trim($fname[1])))) . $ext[0];
     $this->RedirectDownload($downl[1], $fname, 0, 0, 0, $fname);
 }
 private function Login($link)
 {
     global $premium_acc;
     $pA = !empty($_REQUEST['premium_user']) && !empty($_REQUEST['premium_pass']) ? true : false;
     $user = $pA ? $_REQUEST['premium_user'] : $premium_acc['ultramegabit_com']['user'];
     $pass = $pA ? $_REQUEST['premium_pass'] : $premium_acc['ultramegabit_com']['pass'];
     if (empty($user) || empty($pass)) {
         html_error('Login Failed: User or Password is empty. Please check login data.');
     }
     $purl = 'http://ultramegabit.com/';
     $post = array();
     $post['csrf_token'] = cut_str($this->page, 'name="csrf_token" value="', '"');
     $post['submit'] = 'Login';
     $post['return_url'] = urlencode($purl . 'user/details');
     $post['username'] = urlencode($user);
     $post['password'] = urlencode($pass);
     $page = $this->GetPage($purl . 'login', $this->cookie, $post, $purl);
     is_present($page, 'Invalid username or password', 'Login failed: User/Password incorrect.');
     is_notpresent($page, "\r\nContent-Length: 0\r\n", 'Login failed.');
     $this->cookie = GetCookiesArr($page);
     $page = $this->GetPage($purl . 'user/details', $this->cookie, 0, $purl . 'login');
     $this->page = $this->GetPage($link, $this->cookie);
     if (stripos($page, '"Premium Member"') === false) {
         $this->changeMesg(lang(300) . '<br /><b>Account isn\'t premium</b><br />Using it as member.');
         return $this->FreeDL($link, true);
     } else {
         return $this->PremiumDL($link);
     }
 }
 private function login()
 {
     global $premium_acc, $L;
     $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["sendspace_com"]["user"];
     $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["sendspace_com"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login failed, username[{$user}] or password[{$pass}] is empty!");
     }
     $posturl = 'http://www.sendspace.com/';
     $post = array();
     $post['action'] = 'login';
     $post['submit'] = 'login';
     $post['target'] = urlencode('%2F');
     $post['action_type'] = 'login';
     $post['remember'] = 1;
     $post['username'] = $user;
     $post['password'] = $pass;
     $post['remember'] = 'on';
     $page = $this->GetPage($posturl . 'login.html', $this->cookie, $post, $posturl);
     $cookie = GetCookiesArr($page, $this->cookie);
     is_present($cookie['ssal'], "deleted", "Login incorrect retype your username or password correctly");
     $page = $this->GetPage($posturl . 'mysendspace/myindex.html', $cookie);
     if (!preg_match('/<li>You[\\s\\t]?have[\\s\\t]?([\\d\\.]+)([\\w]?B)[\\s\\t]?available[\\s\\t]?bandwidth<\\/li>/', $page, $q)) {
         html_error('Error[Can\'t check Premium Bandwidth Limit or Account Free!]');
     }
     $this->changeMesg($L->say['_retrieving'] . "<br />Sendspace.com Premium Download<br />You have: {$q[1]} {$q[2]} available bandwidth.");
     return $cookie;
 }
function GetMUSites($page = '')
{
    global $cookie, $domain;
    if (empty($page)) {
        $page = geturl($domain, 80, "/", 0, $cookie);
        is_page($page);
        if (preg_match('@Location: http://([^/|\\r|\\n]+)/@i', $page, $rd)) {
            $domain = $rd[1];
            $page = geturl($domain, 80, "/", 0, $cookie);
            is_page($page);
        }
        $cookie = GetCookiesArr($page);
    }
    if (!preg_match_all("@showdetails\\('(\\w+)'\\)@i", $page, $hosts)) {
        html_error('Cannot Check Supported Sites [1]');
    }
    $sites = array();
    foreach ($hosts[1] as $host) {
        $popup = cut_str($page, 'id="details_' . $host . '">', '</div></div>');
        if (empty($popup) || (!preg_match('@"(?:http://[^"]+/)?logos/(\\d+)\\.[^"]+"@i', $popup, $hid) || !preg_match('@Upload files directly into my ([^\\"|\'|\\<|\\:]+) account\\:@i', $popup, $name))) {
            html_error("Cannot Check Supported Sites [2 ({$host})]");
        }
        $name[1] = trim($name[1]);
        if ($hid[1] != 14) {
            $sites[] = array('hname' => $name[1], 'id' => $hid[1], 'sname' => $host);
        }
        unset($popup, $hid, $name);
    }
    return $sites;
}
 public function Download($link)
 {
     $this->link = $link;
     $this->cookie = array('ziplocale' => 'en');
     if (!preg_match('@https?://(?:[\\w\\-]+\\.)*zippyshare\\.com/\\w/(\\w+)@i', $this->link, $this->fid)) {
         html_error('File ID not found at link. Invalid link?');
     }
     $this->fid = $this->fid[1];
     if (!empty($_POST['step'])) {
         switch ($_POST['step']) {
             case '1':
                 return $this->CheckCaptcha();
             case '2':
                 return $this->GetDecodedLink();
         }
     }
     $this->page = $this->GetPage($this->link, $this->cookie);
     is_present($this->page, '>File does not exist on this server<', 'File does not exist.');
     is_present($this->page, '>File has expired and does not exist anymore on this server', 'File does not exist.');
     $this->cookie = GetCookiesArr($this->page, $this->cookie);
     //if (($pos = stripos($this->page, 'getElementById(\'dlbutton\').href')) !== false || ($pos = stripos($this->page, 'getElementById("dlbutton").href')) !== false) return $this->GetJSEncodedLink();
     if ($this->findJS()) {
         return $this->GetJSEncodedLink();
     } else {
         return $this->GetCaptcha();
     }
 }
Beispiel #10
0
 private function login()
 {
     global $premium_acc, $L;
     $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["filehost_ws"]["user"];
     $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["filehost_ws"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login failed, username or password is empty!");
     }
     $posturl = 'http://www.filehost.ws/';
     $post['op'] = 'login';
     $post['redirect'] = urlencode($posturl);
     $post['login'] = $user;
     $post['password'] = $pass;
     $page = $this->GetPage($posturl . 'login.html', $this->cookie, $post, $posturl);
     $this->cookie = GetCookiesArr($page, $this->cookie);
     is_present($page, 'Incorrect Login or Password');
     //check account
     $page = $this->GetPage($posturl . '?op=my_account', $this->cookie, 0, $posturl);
     if (stripos($page, 'Premium account expire')) {
         $this->changeMesg($L->say['_retrieving'] . "<br />Filehost.ws Premium Download");
         return $this->Premium();
     } else {
         $this->changeMesg($L->say['_retrieving'] . "<br />Filehost.ws Free Member");
         return $this->Free();
     }
 }
 private function Free()
 {
     if ($_REQUEST['step'] == 1) {
         $this->cookie = urldecode($_POST['cookie']);
         $post = array();
         foreach ($_POST['temp'] as $k => $v) {
             $post[$k] = $v;
         }
         $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
         $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
         $page = $this->GetPage($this->link, $this->cookie, $post, $this->link);
     } else {
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
         $form = cut_str($this->page, '<Form method="POST" action=\'\'>', '</Form>');
         if (!preg_match_all('/type="hidden"[\\s\\t\\r\\n]? name="([^"]+)"[\\s\\t\\r\\n]? value="([^"]+)"/', $form, $one) || !preg_match_all('/name="(\\w+_free)" .+ value="([^"]+)"/', $form, $two)) {
             html_error('Error[Post Data 1 - FREE not found!]');
         }
         $match = array_merge(array_combine($one[1], $one[2]), array_combine($two[1], $two[2]));
         $post = array();
         foreach ($match as $key => $value) {
             $post[$key] = $value;
         }
         $page = $this->GetPage($this->link, $this->cookie, $post, $this->link);
     }
     is_present($page, 'This file is available for Premium Users only');
     if (stripos($page, 'Recaptcha')) {
         $form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
         if (stripos($form, 'Wrong captcha')) {
             echo "<div align='center'><font color='red'><b>Entered CAPTCHA was incorrect, please try again!</b></font></div>";
         }
         if (!preg_match('/(\\d+)<\\/span> seconds/', $form, $w)) {
             html_error('Error[Timer not found!]');
         }
         $this->CountDown($w[1]);
         if (!preg_match('/\\/api\\/challenge\\?k=([^"]+)"/', $form, $c)) {
             html_error('Error[Captcha Data not found!]');
         }
         if (!preg_match_all('/name="([^"]+)" ((id|class)="[^"]+" )?value="([^"]+)?"/i', $form, $match)) {
             html_error('Error[Post Data 2 - FREE not found!]');
         }
         $match = array_combine($match[1], $match[4]);
         $data = $this->DefaultParamArr($this->link, $this->cookie);
         $data['step'] = 1;
         foreach ($match as $k => $v) {
             $data["temp[{$k}]"] = $v;
         }
         $this->Show_reCaptcha($c[1], $data);
         exit;
     }
     is_present($page, cut_str($page, '<div class="err">', '<br>'));
     if (!preg_match('/https?:\\/\\/f\\d+\\.ex-load\\.com(:\\d+)?\\/d\\/[^\\s\\t\\r\\n"]+/', $page, $dl)) {
         html_error('Error[Download Link - FREE not found!]');
     }
     $dlink = trim($dl[0]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $this->cookie, 0, $this->link);
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, cut_str($page, '<div style="text-align:center">', '<br>'));
     $cookie = GetCookiesArr($page);
     if (!preg_match('/https?:\\/\\/(?:www\\.)?datafilehost\\.com\\/get\\.php\\?file=[^\'\\"\\t<>\\r\\n\\\\]+/i', $page, $dl)) {
         html_error("Error[DownloadLink] not found!");
     }
     $dlink = trim($dl[0]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
     exit;
 }
Beispiel #13
0
 private function AnonDL()
 {
     if (empty($_POST['step']) || $_POST['step'] != '1') {
         $page = $this->GetPage($this->baseurl . '/download/start_timer/' . $this->fid, $this->cookie, 0, $this->link . "\r\nX-Requested-With: XMLHttpRequest");
         $this->cookie = GetCookiesArr($page, $this->cookie);
         $start_timer = $this->json2array($page, 'StartTimer Error');
         if (empty($start_timer) || empty($start_timer['show_timer']) && empty($start_timer['redirect_url'])) {
             if (!empty($start_timer['html'])) {
                 if (preg_match('@Delay between downloads must be not less than \\d+ minutes.\\s+Try again in \\d+ minutes@i', $page, $err)) {
                     html_error("[AnonDL] {$err[0]}");
                 }
                 html_error('Error @ StartTimer: ' . htmlspecialchars(strip_tags($start_timer['html']), ENT_QUOTES));
             } else {
                 //  if (substr($page, 9, 3) == '200')
                 textarea($start_timer);
                 html_error('Unknown error @ StartTimer');
             }
         }
         if (strpos($start_timer['redirect_url'], '://') === false) {
             $start_timer['redirect_url'] = $this->baseurl . $start_timer['redirect_url'];
         }
         if (!empty($start_timer['show_timer']) && $start_timer['timer'] > 0) {
             $this->CountDown($start_timer['timer']);
         }
         $page = $this->GetPage($start_timer['redirect_url'], $this->cookie, 0, $this->link);
         $this->cookie = GetCookiesArr($page, $this->cookie);
         if (!preg_match('@https?://api(?:-secure)?\\.solvemedia\\.com/papi/challenge\\.(?:no)?script\\?k=([\\w\\-\\.]+)@i', $page, $smKey)) {
             if (preg_match($this->DLRegexp, $page, $DL)) {
                 return $this->RedirectDownload($DL[0], urldecode(parse_url($DL[0], PHP_URL_PATH)));
             }
             html_error('CAPTCHA not found.');
         }
         $data = $this->DefaultParamArr($this->link, $this->cookie, $start_timer['redirect_url'], true);
         $data['step'] = '1';
         $data['posturl'] = urldecode(parse_url($start_timer['redirect_url'], PHP_URL_PATH));
         return $this->SolveMedia($smKey[1], $data, $start_timer['redirect_url']);
     } else {
         $post = $this->verifySolveMedia();
         $post['send'] = 'Submit';
         $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
         $page = $this->GetPage($this->baseurl . $_POST['posturl'], $this->cookie, $post);
         $this->cookie = GetCookiesArr($page, $this->cookie);
         if (preg_match("@\nLocation: (?:https?://(?:www\\.)?alfafile\\.net)?/file/{$this->fid}/?\r?\n@i", $page)) {
             $page = $this->GetPage($this->link, $this->cookie);
         }
         if (!preg_match($this->DLRegexp, $page, $DL)) {
             html_error('Download Link Not Found.');
         }
         return $this->RedirectDownload($DL[0], urldecode(parse_url($DL[0], PHP_URL_PATH)));
     }
 }
Beispiel #14
0
 private function FreeDL()
 {
     $pUrl = 'http://filesflash.com/freedownload.php';
     if (!empty($_POST['step']) && $_POST['step'] == '1') {
         if (!empty($_POST['cookie'])) {
             $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
         }
         if (empty($_POST['recaptcha_response_field'])) {
             html_error('You didn\'t enter the image verification code.');
         }
         if (empty($_POST['recaptcha_challenge_field'])) {
             html_error('Empty reCAPTCHA challenge.');
         }
         $post = array();
         $post['token'] = $_POST['token'];
         $post['recaptcha_challenge_field'] = urlencode($_POST['recaptcha_challenge_field']);
         $post['recaptcha_response_field'] = urlencode($_POST['recaptcha_response_field']);
         $post['submit'] = 'Submit';
         $page = $this->GetPage($pUrl, $this->cookie, $post);
         is_present($page, 'Your IP address is already downloading another link.');
         if (stripos($page, 'google.com/recaptcha/api/') !== false || stripos($page, 'recaptcha.net/') !== false) {
             html_error('Wrong captcha entered.');
         }
         if (!preg_match($this->DLregexp, $page, $dlink)) {
             html_error('Error: Download link not found.');
         }
         if (!preg_match('@\\scount\\s*=\\s*(\\d+)\\s*;@i', $page, $wait)) {
             html_error('Error: Countdown not found.');
         }
         if ($wait[1] > 0) {
             $this->CountDown($wait[1]);
         }
         return $this->RedirectDownload($dlink[0], urldecode(basename(parse_url($dlink[0], PHP_URL_PATH))), $this->cookie, 0, $pUrl);
     }
     $this->cookie = GetCookiesArr($this->page, $this->cookie);
     $post = array();
     $post['token'] = urlencode(cut_str($this->page, 'name="token" value="', '"')) or html_error('Download Token not Found.');
     $post['freedl'] = urlencode(cut_str($this->page, 'name="freedl" value="', '"')) or $post['submit'] = '+Start+free+download+';
     $page = $this->GetPage($pUrl, $this->cookie, $post);
     is_present($page, 'Your IP address is already downloading another link.');
     $data = $this->DefaultParamArr($this->link, $this->cookie, true, true);
     $data['step'] = 1;
     $data['token'] = $post['token'];
     // Modified regexp
     if (!preg_match('@https?://(?:[\\w\\-]+\\.)?(?:google\\.com/recaptcha/api|recaptcha\\.net)/(?:challenge|noscript)\\?(?:[^\'\\"<>&]+&(?:amp;)?)*k=([\\w\\.\\-]+)@i', $page, $reCaptcha)) {
         html_error('reCAPTCHA not found.');
     }
     $this->reCAPTCHA($reCaptcha[1], $data);
     exit;
 }
Beispiel #15
0
 public function Download($link)
 {
     global $premium_acc;
     $this->cookie = array();
     if (empty($_POST['skip']) || $_POST['skip'] != 'true') {
         global $Referer;
         $this->page = $this->GetPage($link, $this->cookie);
         if (substr($this->page, 9, 3) == '404') {
             html_error('File not Found or Deleted');
         }
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
         if (preg_match('@\\r\\nLocation: ((https?://(?:www\\.)?filecloud\\.io)?/[^\\r\\n]+)@i', $this->page, $redir)) {
             $this->redir = empty($redir[2]) ? 'http://filecloud.io' . $redir[1] : $redir[1];
             $this->page = $this->GetPage($this->redir, $this->cookie, 0, $link);
             $this->cookie = GetCookiesArr($this->page, $this->cookie);
             $Referer = $this->redir;
         } else {
             $Referer = $link;
         }
         if (preg_match('@\\nLocation: (https?://s\\d+\\.filecloud\\.io/[^\\r\\n]+)@i', $this->page, $dllink)) {
             $filename = urldecode(basename(parse_url($dllink[1], PHP_URL_PATH)));
             return $this->RedirectDownload($dllink[1], $filename);
         }
     }
     // Check https support for login.
     $cantlogin = false;
     if (!extension_loaded('openssl')) {
         if (extension_loaded('curl')) {
             $cV = curl_version();
             if (!in_array('https', $cV['protocols'], true)) {
                 $cantlogin = true;
             }
         } else {
             $cantlogin = true;
         }
         if ($cantlogin) {
             $this->changeMesg(lang(300) . '<br /><br />Https support: NO<br />Login disabled.');
         }
     }
     if ($_REQUEST['premium_acc'] == 'on' && (!empty($_REQUEST['premium_user']) && !empty($_REQUEST['premium_pass']) || !empty($premium_acc['filecloud_io']['user']) && !empty($premium_acc['filecloud_io']['pass']) || !empty($premium_acc['filecloud_io']['apikey']))) {
         $this->Login($cantlogin);
     } elseif (!empty($_POST['skip']) && $_POST['skip'] == 'true') {
         $this->_ukey = urldecode($_POST['_ukey']);
         $this->ab1 = urldecode($_POST['_ab1']);
         $this->chkcaptcha($link, true);
     } else {
         $this->Prepare($link);
     }
 }
 public function Download($link)
 {
     global $premium_acc;
     $page = $this->GetPage($link);
     is_present($page, 'That file is not available for download');
     $CookieArr = GetCookiesArr($page);
     $cookie = CookiesToStr($CookieArr);
     $url = "http://filesflash.com/";
     $email = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["filesflash_com"]["user"];
     $pass = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["filesflash_com"]["pass"];
     if (!empty($email) && !empty($pass)) {
         $post = array();
         $post['email'] = urlencode($email);
         $post['password'] = urlencode($pass);
         $post['submit'] = 'Login';
         $page = $this->GetPage($url . "login.php", $cookie, $post, $url);
         is_present($page, "Invalid email address or password.");
         $cookie = CookiesToStr(array_merge($CookieArr, GetCookiesArr($page)));
         // check account
         $page = $this->GetPage($url . "myaccount.php", $cookie, 0, $url . "index.php");
         is_present($page, "<td>Premium Status:</td><td>Not Premium", "Account Status: Free");
         // start download link
         $page = $this->GetPage($link, $cookie);
         if (!preg_match("@Location: (http:\\/\\/[^\r\n]+)@i", $page, $dl)) {
             html_error("Error: Download Link [PREMIUM] not found!");
         }
         $dlink = trim($dl[1]);
         $filename = basename(parse_url($dlink, PHP_URL_PATH));
         $this->RedirectDownload($dlink, $filename, $cookie);
     } else {
         $post = array();
         $post['token'] = cut_str($page, 'name="token" value="', '"');
         $post['freedl'] = " Free Download ";
         $page = $this->GetPage($url . 'freedownload.php', $cookie, $post, $link);
         is_present($page, "Your link has expired. Please try again.");
         if (!preg_match('/count=(\\d+)/', $page, $wait)) {
             html_error("Error: Timer not found!");
         }
         $this->CountDown($wait[1]);
         $dlink = cut_str($page, '<div id="link" style="display:none"><a href="', '">');
         if (!$dlink) {
             html_error("Error: Download Link [FREE] not found???");
         }
         $FileName = basename(parse_url($dlink, PHP_URL_PATH));
         $this->RedirectDownload($dlink, $FileName, $cookie, 0, $url . 'freedownload.php');
         exit;
     }
 }
Beispiel #17
0
 private function MF_Captcha()
 {
     if (!empty($this->page) && stripos($this->page, ">Authorize Download</a>") === false) {
         return;
     }
     if (!empty($_POST['step']) && $_POST['step'] == '1') {
         $_POST['step'] = false;
         if (empty($_POST['recaptcha2_response_field']) && empty($_POST['recaptcha_response_field']) && empty($_POST['adcopy_response'])) {
             html_error('You didn\'t enter the image verification code.');
         }
         if (empty($_POST['adcopy_response'])) {
             if (empty($_POST['recaptcha2_public_key'])) {
                 $post = array('recaptcha_challenge_field' => urlencode($_POST['recaptcha_challenge_field']), 'recaptcha_response_field' => urlencode($_POST['recaptcha_response_field']));
             } else {
                 $post = $this->verifyReCaptchav2();
             }
         } else {
             $post = $this->verifySolveMedia();
         }
         $this->cookie = StrToCookies(urldecode($_POST['cookie']));
         $purl = 'http://www.mediafire.com/?' . $this->fid[3];
         $this->page = $this->GetPage($purl, $this->cookie, $post);
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
         is_present($this->page, 'Your entry was incorrect, please try again!');
         $this->page = $this->GetPage($this->link, $this->cookie, 0, $purl);
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
         is_present($this->page, 'Your entry was incorrect, please try again!.');
         $this->MF_Captcha();
     } else {
         $data = $this->DefaultParamArr($this->link, $this->cookie);
         $data['step'] = 1;
         if (($pos = stripos($this->page, 'data-sitekey=')) !== false && preg_match('@data-sitekey=\\s*[\\"\']([\\w\\.\\-]+)[\\"\']@i', $this->page, $cKey, 0, $pos)) {
             // reCAPTCHA v2
             return $this->reCAPTCHAv2($cKey[1], $data);
         } else {
             if (($pos = stripos($this->page, '://api.solvemedia.com/')) !== false && preg_match('@https?://api\\.solvemedia\\.com/papi/challenge\\.(?:no)?script\\?k=([\\w\\.\\-]+)@i', $this->page, $cKey, 0, $pos)) {
                 // SolveMedia
                 return $this->SolveMedia($cKey[1], $data);
             } else {
                 if (preg_match('@https?://(?:[^/]+\\.)?(?:(?:google\\.com/recaptcha/api)|(?:recaptcha\\.net))/(?:(?:challenge)|(?:noscript))\\?k=([\\w\\.\\-]+)@i', $this->page, $cKey)) {
                     // Old reCAPTCHA
                     return $this->reCAPTCHA($cKey[1], $data);
                 }
             }
         }
         html_error('Error: CAPTCHA not found.');
     }
 }
Beispiel #18
0
 public function Download($link)
 {
     global $premium_acc;
     if (!$_REQUEST['step']) {
         $this->cookie['sdlanguageid'] = '2';
         $this->page = $this->GetPage($link, $this->cookie);
         is_present($this->page, 'File was not found in the depFile database. It is possible that you provided wrong link.');
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
     }
     $this->link = $link;
     if ($_REQUEST['premium_acc'] == 'on' && ($_REQUEST['premium_user'] && $_REQUEST['premium_pass'] || $premium_acc['depfile_com']['user'] && $premium_acc['depfile_com']['pass'])) {
         return $this->Premium();
     } else {
         return $this->Free();
     }
 }
 public function Download($link)
 {
     global $premium_acc;
     $link = str_replace('clz.to/', 'cloudzer.net/file/', $link);
     $this->link = $link;
     if (!$_REQUEST['step']) {
         $this->page = $this->GetPage($this->link);
         is_present($this->page, '/404', 'Error[File not found!]');
         $this->cookie = GetCookiesArr($this->page);
     }
     if ($_REQUEST['premium_acc'] == 'on' && ($_REQUEST['premium_user'] && $_REQUEST['premium_pass'] || $premium_acc['cloudzer_net']['user'] && $premium_acc['cloudzer_net']['pass'])) {
         return $this->Premium();
     } else {
         return $this->Free();
     }
 }
Beispiel #20
0
 public function Download($link)
 {
     $this->cookie = !empty($_POST['step']) && !empty($_POST['cookie']) ? StrToCookies(decrypt(urldecode($_POST['cookie']))) : array('ff' => 'off');
     if (!preg_match('@/video/(x[0-9a-zA-Z]+)@i', $link, $xid)) {
         html_error('Video ID not found.');
     }
     $this->xid = $xid[1];
     $this->link = 'http://www.dailymotion.com/video/' . $this->xid;
     if (empty($_POST['step'])) {
         $page = $this->GetPage($this->link, $this->cookie);
         $this->cookie = GetCookiesArr($page, $this->cookie);
         $status = (int) substr($page, 9, 3);
         switch ($status) {
             case 200:
                 break;
             case 403:
                 html_error('This video is forbidden to download!');
                 break;
             case 404:
                 html_error('404 Not Found');
                 break;
             case 410:
                 html_error('This video has been removed by the user.');
                 break;
             default:
                 html_error("Unexpected response: {$status}");
                 break;
         }
     }
     $this->getVideoInfo();
     if (empty($_POST['dlstream']) && !isset($_GET['audl'])) {
         return $this->QSelector();
     } elseif (empty($_POST['dlstream']) || !empty($this->streams[$_POST['dlstream']])) {
         $key = empty($_POST['dlstream']) ? key($this->streams) : $_POST['dlstream'];
         $DL = $this->streams[$key];
     } else {
         html_error('Selected video stream was not found.');
     }
     $filename = preg_replace('@[^ A-Za-z_\\-\\d\\.,\\(\\)\\[\\]\\{\\}&\\!\'\\@\\%\\#]@u', '_', trim($this->title), ENT_QUOTES);
     $filename .= " [DM-{$key}p][{$this->xid}].mp4";
     $page = $this->GetPage($DL, $this->cookie);
     if (!preg_match('@https?://[^/\\s]+/video/[^\\s<>\'\\"]+@i', $page, $DL)) {
         html_error('Download Link not Found.');
     }
     $this->RedirectDownload($DL[0], $filename, $this->cookie, 0, 0, $filename);
 }
Beispiel #21
0
 public function Download($link)
 {
     if ($_REQUEST['step'] == 'Captcha') {
         $post['captcha_key'] = $_POST['captcha_key'];
         $post['captcha'] = $_POST['captcha'];
         $post['download'] = 'Download';
         $link = urldecode($_POST['link']);
         $cookie = urldecode($_POST['cookie']);
         $page = $this->GetPage($link, $cookie, $post, $link);
     } else {
         $page = $this->GetPage($link, array('lang' => 'us'));
         is_present($page, 'Attention! This file has been deleted from our server by user who uploaded it on the server.');
         is_notpresent($page, '<h1>Download file</h1>', 'Download file is not available for ur server area!');
         $cookie = GetCookiesArr($page, array('lang' => 'us'));
         if (!preg_match('/(\\d+)<\\/b> second/', $page, $wait)) {
             html_error('Error[Timer not found!]');
         }
         $this->CountDown($wait[1]);
         $time = time();
         $data = $this->DefaultParamArr($link, $cookie);
         $data['step'] = 'Captcha';
         $data['captcha_key'] = $time;
         // get the captcha
         $cap = $this->GetPage('http://gigapeta.com/img/captcha.gif?x=' . $time, $cookie);
         $capt_img = substr($cap, strpos($cap, "\r\n\r\n") + 4);
         $imgfile = DOWNLOAD_DIR . "gigapeta_captcha.gif";
         if (file_exists($imgfile)) {
             unlink($imgfile);
         }
         if (!write_file($imgfile, $capt_img)) {
             html_error("Error getting CAPTCHA image.");
         }
         $this->EnterCaptcha($imgfile, $data, 20);
         exit;
     }
     is_present($page, 'Entered figures don&#96;t coincide with the picture', 'You entered a wrong CAPTCHA code. Please try again.');
     if (!preg_match('/Location: (http:\\/\\/[a-z0-9]+\\.gigapeta\\.com\\/download[^|\\r|\\n]+)/i', $page, $dl)) {
         html_error('Error: Download link not found!');
     }
     $dlink = trim($dl[1]);
     $FileName = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $FileName, $cookie, 0, $link);
     exit;
 }
Beispiel #22
0
 private function RetrieveCaptcha()
 {
     $page = $this->GetPage($this->link, $this->cookie);
     is_present($page, '/404.html', 'No such file or the file has been removed due to copyright infringement issues.');
     $form = cut_str($page, '<form id="captchaForm"', '</form>');
     if (!preg_match('/https?:\\/\\/api\\.solvemedia\\.com\\/papi\\/challenge\\.noscript\\?k=[^\\r\\n"]+/i', $form, $c)) {
         html_error('Error[Captcha Data not found!]');
     }
     $challenge = $this->GetPage($c[0], 0, 0, $this->link);
     $cookieapi = GetCookiesArr($challenge);
     if (!preg_match_all('/<input type=hidden name="([^"]+)"( id="([^"]+)")? value="([^"]+)"?/', $challenge, $tmp)) {
         html_error('Error[Post Data Captcha not found!]');
     }
     $tmp = array_combine($tmp[1], $tmp[4]);
     if (!preg_match('@<img [^/|<|>]*src\\s?=\\s?\\"(/papi/media\\?c=[^\\"|<|>]+)\\"@i', $challenge, $ch)) {
         html_error('CAPTCHA img not found.');
     }
     $imgurl = 'http://api.solvemedia.com' . $ch[1];
     $cap = $this->GetPage($imgurl, $cookieapi);
     $capt_img = substr($cap, strpos($cap, "\r\n\r\n") + 4);
     $imgfile = DOWNLOAD_DIR . 'vidbux_captcha.gif';
     if (file_exists($imgfile)) {
         unlink($imgfile);
     }
     if (!write_file($imgfile, $capt_img)) {
         html_error('Error getting CAPTCHA image.');
     }
     if (!preg_match_all('/<input name="([^"]+)" type="hidden" value="([^"]+)?"\\/?>/', $form, $match)) {
         html_error('Error[Post Data - FREE not found!]');
     }
     $match = array_combine($match[1], $match[2]);
     $data = $this->DefaultParamArr($this->link, $this->cookie);
     foreach ($match as $k => $v) {
         $data["post[{$k}]"] = $v;
     }
     foreach ($tmp as $k => $v) {
         $data["postcap[{$k}]"] = $v;
     }
     $data['imgurl'] = urlencode($imgurl);
     $data['cookieapi'] = urlencode(CookiesToStr($cookieapi));
     $data['step'] = '1';
     $this->EnterCaptcha($imgfile . '?' . time(), $data, 20);
     exit;
 }
Beispiel #23
0
 private function login()
 {
     global $premium_acc;
     $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["cloudzer_net"]["user"];
     $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["cloudzer_net"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login failed, {$user} [user] or {$pass} [password] is empty!");
     }
     $posturl = 'http://cloudzer.net/';
     $post['id'] = $user;
     $post['pw'] = $pass;
     $page = $this->GetPage($posturl . 'io/login', $this->cookie, $post, $posturl, 0, 1);
     is_present($page, 'User and password do not match!');
     $cookie = GetCookiesArr($page, $this->cookie);
     //check account
     $page = $this->GetPage($posturl . 'me', $cookie, 0, $posturl);
     is_present($page, '>Free<', 'Account Free!');
     return $cookie;
 }
Beispiel #24
0
 private function Premium($link)
 {
     global $premium_acc;
     $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["zbigz_com"]["user"];
     $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["zbigz_com"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login failed, {$user} [user] or {$pass} [password] is empty!");
     }
     $purl = 'http://zbigz.com/';
     $post['login'] = $user;
     $post['password'] = $pass;
     $page = $this->GetPage($purl . "login.php", 0, $post, $purl . "\r\nX-Requested-With: XMLHttpRequest");
     $cookie = GetCookiesArr($page);
     $page = $this->GetPage($link, $cookie);
     $dlink = cut_str($page, 'Location: ', '\\r\\n');
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie);
     exit;
 }
 public function Download($link)
 {
     global $premium_acc;
     if (empty($_POST['step']) || $_POST['step'] != '1') {
         $this->page = $this->GetPage($link);
         is_present($this->page, "The requested file is deleted or is not available for download");
         $this->cookie = GetCookiesArr($this->page);
     }
     if ($_REQUEST["premium_acc"] == "on" && (!empty($_REQUEST["premium_user"]) && $_REQUEST["premium_user"] == 'key' && !empty($_REQUEST["premium_pass"]) || !empty($premium_acc["livefile_org"]["key"]))) {
         $this->lastmesg = lang(300) . "<br />Downloading with premium key.";
         $this->changeMesg($this->lastmesg);
         $pkey = empty($_REQUEST["premium_user"]) || $_REQUEST["premium_user"] != 'key' || empty($_REQUEST["premium_pass"]) ? $premium_acc["livefile_org"]["key"] : trim($_REQUEST["premium_pass"]);
         $this->PremiumKey($link, $pkey);
     } elseif ($_REQUEST["premium_acc"] == "on" && (!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"]) || !empty($premium_acc["livefile_org"]["user"]) && !empty($premium_acc["livefile_org"]["pass"]))) {
         $this->Login($link);
     } else {
         $this->FreeDL($link);
     }
 }
Beispiel #26
0
 private function Retrieve($link)
 {
     $page = $this->GetPage($link);
     if (preg_match("@Location: (http(s)?:\\/\\/[^\r\n]+)@i", $page, $redir)) {
         $link = trim($redir[1]);
         $page = $this->GetPage($link);
     }
     $cookie = GetCookiesArr($page);
     is_present($page, "File not found");
     is_present($page, "Only premium users can download this file");
     is_notpresent($page, 'I have no money', cut_str($page, '<div class="b-download-free download-link">', '<a class="b-get-premium" href="/premium.jsp">'));
     if (stripos($page, 'Please wait until download starts')) {
         if (!preg_match('/<div id="\\w+">(\\d+)<\\/div>/', $page, $wait)) {
             html_error('Error [Timer not found!]');
         }
         $this->CountDown($wait[1]);
     }
     if (stripos($page, '<div id="download_link_captcha"')) {
         $form = cut_str($page, 'class="download_link_captcha_en">', '</form>');
         $Url = 'http://extabit.com' . cut_str($form, '<form action="', '"');
         if (!preg_match('/api\\/challenge\\?k=([^"]+)/', $form, $k) && !preg_match('/api\\/noscript\\?k=([^"]+)/', $form, $k)) {
             html_error('Error [Captcha Data not found!]');
         }
         //Download captcha img.
         $ch = cut_str($this->GetPage('http://www.google.com/recaptcha/api/challenge?k=' . $k[1], $cookie), "challenge : '", "'");
         $cap = $this->GetPage("http://www.google.com/recaptcha/api/image?c=" . $ch);
         $capt_img = substr($cap, strpos($cap, "\r\n\r\n") + 4);
         $imgfile = DOWNLOAD_DIR . "extabit_captcha.jpg";
         if (file_exists($imgfile)) {
             unlink($imgfile);
         }
         if (empty($capt_img) || !write_file($imgfile, $capt_img)) {
             html_error("Error getting CAPTCHA image.", 0);
         }
         // Captcha img downloaded
         $data = $this->DefaultParamArr($Url, $cookie);
         $data['step'] = '1';
         $data['challenge'] = $ch;
         $this->EnterCaptcha($imgfile, $data);
         exit;
     }
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, 'File Not Found');
     $cookie = GetCookiesArr($page);
     if (preg_match('#Location: (https?://\\w+\\.uploadcore\\.com/[^\\r\\n\\t\\s]+)#i', $page, $rd)) {
         $link = trim($rd[1]);
         $page = $this->GetPage($link, $cookie);
         $cookie = GetCookiesArr($page, $cookie);
     }
     $id = cut_str($page, 'name="id" value="', '"');
     $FileName = cut_str($page, 'name="fname" value="', '"');
     $referer = cut_str($page, 'name="referer" value="', '"');
     $post = array();
     $post['op'] = "download1";
     $post['usr_login'] = "";
     $post['id'] = $id;
     $post['fname'] = $FileName;
     $post['referer'] = $referer;
     $post['method_free'] = " ";
     $page = $this->GetPage($link, $cookie, $post, $link);
     $rand = cut_str($page, 'name="rand" value="', '"');
     unset($post);
     $post['op'] = "download2";
     $post['id'] = $id;
     $post['rand'] = $rand;
     $post['referer'] = $referer;
     $post['method_free'] = " ";
     $post['method_premium'] = "";
     $post['down_direct'] = "1";
     $page = $this->GetPage($link, $cookie, $post, $link);
     if (!preg_match("#(http://\\w+\\d\\.uploadcore\\.net(:\\d+)?/d/[^\r\n\\s\t'\"]+)#", $page, $dl)) {
         html_error("Error, download link not found!");
     }
     $dlink = trim($dl[1]);
     $Url = parse_url($dlink);
     if (!$FileName) {
         $FileName = basename($Url['path']);
     }
     $this->RedirectDownload($dlink, $FileName, $cookie, 0, $link);
     exit;
 }
Beispiel #28
0
 public function Download($link)
 {
     if (!preg_match('@https?://(?:www\\.)?adrive\\.com/public/(?!(?:dir)?view)(\\w+)(?:/|\\.html?|$)@i', $link, $fid)) {
         if (!preg_match('@https?://(?:\\w+\\.)*adrive\\.com/public/dirview/(\\w+)/(\\d+)@i', $link, $fid)) {
             html_error('Invalid Link?');
         }
         html_error('TODO: Add Folder Support.');
     }
     $page = $this->GetPage($link);
     is_present($page, 'The file you are trying to access is no longer available publicly', 'File Private/Not Found');
     is_present($page, 'The public file you are trying to download is associated with a non-valid ADrive account.');
     $cookie = GetCookiesArr($page);
     if (!preg_match("@https?://(?:\\w+\\.)*adrive\\.com/public/view/{$fid[1]}(?:/[^\\s\"\\'<>]*|\\.html?|\$)@i", $page, $dlLink)) {
         if (preg_match('@https?://(?:\\w+\\.)*adrive.com/public/{$fid[1]}.html@i', $page, $folder)) {
             html_error('TODO: Add (Sub)?Folder Support.');
         }
         html_error('Download Link Not Found.');
     }
     $this->RedirectDownload($dlLink[0], 'adrive_com', $cookie);
 }
 private function login()
 {
     global $premium_acc;
     $email = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["filesflash_com"]["user"];
     $pass = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["filesflash_com"]["pass"];
     if (empty($email) || empty($pass)) {
         html_error('Error[Username : '******' or Password : '******' is empty]');
     }
     $post = array();
     $post['email'] = urlencode($email);
     $post['password'] = urlencode($pass);
     $post['submit'] = 'Login';
     $page = $this->GetPage($this->url . "login.php", $this->cookie, $post, $this->url);
     is_present($page, "Invalid email address or password.");
     $cookie = GetCookiesArr($page, $this->cookie);
     // check account
     $page = $this->GetPage($this->url . "myaccount.php", $cookie, 0, $this->url . "index.php");
     is_present($page, "<td>Premium Status:</td><td>Not Premium", "Account Status: Free");
     return $cookie;
 }
 private function login()
 {
     global $premium_acc;
     $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["speedyshare_com"]["user"];
     $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["speedyshare_com"]["pass"];
     if (empty($user) || empty($pass)) {
         html_error("Login failed, {$user} [user] or {$pass} [password] is empty!");
     }
     $post['redir'] = urlencode(cut_str($link, "http://speedy.sh", "\r\n"));
     $post['login'] = $user;
     $post['pass'] = $pass;
     $post['remember'] = 'on';
     $page = $this->GetPage('https://www.speedyshare.com/login.php', $this->cookie, $post, $link);
     is_present($page, 'Error occured', 'Invalid username or password!');
     $cookie = GetCookiesArr($page, $this->cookie);
     if (!$cookie['spl']) {
         html_error('Error [Invalid account]');
     }
     return $cookie;
 }