GetPage($link, "4langcookie=en"); $this->cookie = GetCookies($page) . "; 4langcookie=en"; //Keep page in english is_present($page, "The file link that you requested is not valid."); is_present($page, "The file is suspected of illegal or copyrighted content."); if ($_REQUEST["premium_acc"] == "on" && (($_REQUEST["premium_user"] && $_REQUEST["premium_pass"]) || ($premium_acc["4shared_com"]["user"] && $premium_acc["4shared_com"]["pass"]))) { return $this->PremiumDownload($link); } else { return $this->FreeDownload($page, $link); } } private function FreeDownload($page, $link) { $page = $this->CheckForPass($page, $link); preg_match('/.com\/[^\/]+\/([^\/]+)\/?(.*)/i', $link, $L); $page = $this->GetPage("http://www.4shared.com/get/{$L[1]}/{$L[2]}", $this->cookie); if (preg_match('/href=\'(http:\/\/dc[^\']+)\'>Download file now/i', $page, $D)) { $this->cookie = $this->cookie."; ".GetCookies($page); $dllink = $D[1]; if (preg_match('/(?:\?|&)dirPwdVerified=(\w+)/i', $link, $pwd)) $dllink .= "&dirPwdVerified=".$pwd[1]; } else { html_error("Download-link not found."); } $url = parse_url($dllink); $FileName = basename($url["path"]); if (!preg_match('/var c = (\d+)/', $page, $count)) html_error("Timer not found."); if ($count[1] <= 120) $this->CountDown($count[1]); else { $data = $this->DefaultParamArr($dllink, encrypt($this->cookie)); $data['filename'] = urlencode($FileName); $data['host'] = $url["host"]; $data['port'] = $url["port"]; $data['path'] = urlencode($url["path"] . ($url["query"] ? "?" . $url["query"] : "")); $data['saveto'] = $_GET["path"]; $this->JSCountdown($count[1], $data); } $this->RedirectDownload($dllink, $FileName, $this->cookie); } private function JSCountdown($secs, $post = 0, $text='Waiting link timelock') { global $PHP_SELF; echo "