cookie = array('lang' => 'en'); // Check link if (empty($_REQUEST['step']) || $_REQUEST['step'] != '1') { $this->page = $this->GetPage($link, $this->cookie); $headers = substr($this->page, 0, strpos($this->page, "\r\n\r\n")); $this->cookie = GetCookiesArr($this->page, $this->cookie); if (preg_match('@\nLocation: ((https?://(?:[a-zA-Z\d\-]+\.)*letitbit\.net)?/[^\r\n]+)@i', $headers, $redir)) { $link = (empty($redir[2])) ? 'http://letitbit.net'.$redir[1] : $redir[1]; $this->page = $this->GetPage($link, $this->cookie); $this->cookie = GetCookiesArr($this->page, $this->cookie); } elseif (preg_match('@\nLocation: https?://[^/\r\n]+/[^\r\n]+@i', $headers)) html_error('Error: Non Acceptable Redirect.'); if (stripos($this->page, 'File not found') !== false) { if ($this->cookie['country'] == 'US') html_error('The requested file was not found or isn\'t downloadable in your server\'s country.'); // It seems that lib blocks downloads from usa... I will check this later and add the error msg if it's true. - T8 html_error('The requested file was not found.'); } } $this->link = $link; if ($_REQUEST ['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST ['premium_pass']) || (!empty($premium_acc ['letitbit_net'] ['user']) && !empty($premium_acc ['letitbit_net'] ['pass'])))) { $user = $_REQUEST ["premium_user"] ? $_REQUEST ["premium_user"] : $premium_acc ["letitbit_net"] ["user"]; $pass = $_REQUEST ["premium_pass"] ? $_REQUEST ["premium_pass"] : $premium_acc ["letitbit_net"] ["pass"]; if (empty($user) || empty($pass)) html_error("Login Failed: Username or Password is empty. Please check login data."); return $this->SkipLoginC($user, $pass); } elseif ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_pass'])||(!empty($premium_acc['letitbit_net']['pass'])))) { $key = ($_REQUEST ["premium_pass"] ? trim($_REQUEST ["premium_pass"]) : $premium_acc["letitbit_net"]["pass"]); return $this->Premium($key); } elseif (!empty($_REQUEST['step']) && $_REQUEST['step'] == '1') { return $this->Free(); } else { return $this->Retrieve(); } } private function Retrieve() { if (!preg_match("@
')); if (empty($form)) html_error('Error: Empty Free Form 1!'); $post = $this->AutomatePost($form); if (stripos($form_action, 'born_iframe') !== false) { $page = $this->GetPage("http://letitbit.net$form_action", $this->cookie, $post); if (!preg_match("@')); if (empty($form)) html_error('Error: Empty Free Form 2!'); $post = $this->AutomatePost($form); $form_action = trim(cut_str($form_tag[0], 'action="', '"')); } $this->link = "http://letitbit.net$form_action"; $page = $this->GetPage($this->link, $this->cookie, $post); $this->cookie = GetCookiesArr($page, $this->cookie); unset($post, $form_tag, $form_action); if (!preg_match("/ajax_check_url = '((http:\/\/[a-z0-9]+\.[\w.]+)\/[^\r\n']+)';/", $page, $check)) html_error("Error: Redirect link [Free] not found!"); $this->link = $check[1]; $this->server = $check[2]; // If you want, you can skip the countdown... if (preg_match('@(\d+)<\/span> seconds@', $page, $wait)) $this->CountDown($wait[1]); // end countdown timer... $this->GetPage($this->link, $this->cookie, array(), 0, 0, 1); //empty array in post variable needed... if (!preg_match('@https?://(?:[^/]+\.)?(?:(?:google\.com/recaptcha/api)|(?:recaptcha\.net))/(?:(?:challenge)|(?:noscript))\?k=([\w|\-]+)@i', $page, $pid)) html_error('reCAPTCHA not found.'); if (!preg_match('@var[\s\t]+recaptcha_control_field[\s\t]*=[\s\t]*\'([^\'\;]+)\'@i', $page, $ctrl)) html_error('Captcha control field not found.'); $data = $this->DefaultParamArr($this->server . "/ajax/check_recaptcha.php", $this->cookie); $data['step'] = '1'; $data['recaptcha_control_field'] = rawurlencode($ctrl[1]); $this->Show_reCaptcha($pid[1], $data); } private function Free() { if (empty($_POST['recaptcha_response_field'])) html_error('You didn\'t enter the image verification code.'); $post = array(); $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field']; $post['recaptcha_response_field'] = $_POST['recaptcha_response_field']; $post['recaptcha_control_field'] = rawurlencode(rawurldecode($_POST['recaptcha_control_field'])); $this->cookie = urldecode($_POST['cookie']); $page = $this->GetPage($this->link, $this->cookie, $post, 0, 0, 1); //too many XML request needed so I used default http.php function in geturl... is_present($page, 'error_wrong_captcha', 'Error: Wrong Captcha Entered.'); is_present($page, 'error_free_download_blocked', 'Error: FreeDL limit reached.'); if (!preg_match_all('/"(https?:[^\|\r\n\"\']+)"?/', $page, $dl)) html_error('Error: Download link [Free] not found.'); $dlink = str_replace('\\', '', trim($dl[1][array_rand($dl[1])])); $FileName = urldecode(basename(parse_url($dlink, PHP_URL_PATH))); $this->RedirectDownload($dlink, $FileName, $this->cookie, 0); exit(); } private function Show_reCaptcha($pid, $inputs, $sname = 'Download File') { global $PHP_SELF; if (!is_array($inputs)) html_error('Error parsing captcha data.'); // Themes: 'red', 'white', 'blackglass', 'clean' echo "\n"; echo "\n