function insert_timer($countd, $caption = '', $timeouttext = '', $hide = false) { if (empty($countd) || !is_numeric($countd) || $countd < 0) { return false; } $countd = ceil($countd); $timerid = jstime(); echo "\n<div id='timer_{$timerid}' align='center'>\n\t<br /><span class='caption'>{$caption}</span> \n\t<span id='timerlabel_{$timerid}' class='caption'></span>\n</div>\n<script type='text/javascript'>/* <![CDATA[ */\n\tvar count_{$timerid} = {$countd};\n\tfunction timer_{$timerid}() {\n\t\tif (count_{$timerid} > 0) {\n\t\t\t\$('#timerlabel_{$timerid}').html('" . sprintf(lang(87), "' + count_{$timerid} + '") . "');\n\t\t\tcount_{$timerid}--;\n\t\t\tsetTimeout('timer_{$timerid}()', 1000);\n\t\t}"; if ($hide) { echo "else \$('#timer_{$timerid}').css('display', 'none');"; } elseif (!empty($timeouttext)) { echo "else \$('#timer_{$timerid}').html('" . addslashes($timeouttext) . "');"; } echo "\n\t} timer_{$timerid}();\n/* ]]> */</script>"; flush(); sleep($countd); return true; }
if ($fsize > $userInfo['storage']['free']) { html_error('You don\'t have the enough free space in your anon account for upload this file.'); } } // Retrive upload ID echo "<script type='text/javascript'>document.getElementById('login').style.display='none';</script>\n<div id='info' width='100%' align='center'>Retrieving upload ID</div>\n"; // Create Share $page = geturl('open.ge.tt', 80, '/1/shares/create?accesstoken=' . urlencode($userInfo['accesstoken']) . '&t=' . jstime(), $referer, $cookie, '', 0, $_GET['proxy'], $pauth); is_page($page); $share = json2array($page, 'Create Share Error'); if (empty($share['sharename'])) { html_error('Cannot get Share ID'); } // Create File $post = array('filename' => $lname); $page = geturl('open.ge.tt', 80, '/1/files/' . urlencode($share['sharename']) . '/create?accesstoken=' . urlencode($userInfo['accesstoken']) . '&t=' . jstime(), $referer, $cookie, json_encode($post), 0, $_GET['proxy'], $pauth); is_page($page); $file = json2array($page, 'Create File Error'); if (empty($file['getturl'])) { html_error('Download link not found.'); } if (empty($file['upload']['posturl'])) { html_error('Upload URL not Found.'); } // posturl puturl // Uploading echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n"; $url = parse_url($file['upload']['posturl']); // .'&nounce='.exports_uuid() $upfiles = upfile($url['host'], defport($url), $url['path'] . (!empty($url['query']) ? '?' . $url['query'] : ''), $file['getturl'], $cookie, array(), $lfile, $lname, 'blob', '', $_GET['proxy'], $pauth, 0, $url['scheme']); //$upfiles = putfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $file['getturl'], $cookie, $lfile, $lname, $_GET['proxy'], $pauth, 0, $url['scheme']);
private function Premium($password = false) { if ($password == true) { $post['code'] = $_POST['code']; $post['file_pass'] = $_POST['password']; $post['token'] = $_POST['token']; $Url = urldecode($_POST['link']); $this->Cookies = decrypt(urldecode($_POST['cookie'])); $this->page = $this->GetPage($Url, $this->Cookies, $post, $this->link); if (!preg_match('@"js":\\{"(\\w+)":\\{?"([^"]+)"?:?"?([^|\\r|\\n|"]+)?"\\}@i', $this->page, $match)) { html_error("Error: Unknown Password Link [PREMIUM] page response, plugin need to be updated!"); } switch ($match[1]) { case 'error': echo "<center><font color='red'><b>{$match['2']}</b></font></center>"; $data = $this->DefaultParamArr($Url, encrypt($this->Cookies), $this->link); $data['step'] = 'Passpre'; $data['code'] = $_POST['code']; $data['token'] = $_POST['token']; $this->EnterPassword($data); break; case 'answer': switch ($match[2]) { case 'link': $dlink = str_replace('\\', '', $match[3]); $filename = basename(parse_url($dlink, PHP_URL_PATH)); $this->RedirectDownload($dlink, $filename, $this->Cookies); break; } break; } } else { $this->page = $this->GetPage($this->link, $this->Cookies, 0, $this->link); is_present($this->page, "You can only download 50GB a day"); if (strpos($this->page, 'var is_pass_exists = true')) { if (!preg_match("@code: '([^']+)',@", $this->page, $code) || !preg_match("@[({]token: '([^']+)',@", $this->page, $token)) { html_error('Error: Post Password Data [Premium] not found!'); } $Url = "http://filepost.com/files/get/?SID={$this->Cookies['SID']}&JsHttpRequest=" . jstime() . "-xml"; $data = $this->DefaultParamArr($Url, encrypt(CookiesToStr($this->Cookies)), $this->link); $data['code'] = $code[1]; $data['token'] = $token[1]; $data['step'] = 'Passpre'; $this->EnterPassword($data); exit; } if (!preg_match('@http(s)?:\\/\\/fs\\d+\\.filepost\\.com\\/get_file\\/[^|\\r|\\n|\']+@i', $this->page, $dl)) { html_error("Error: Download Link [PREMIUM] non password not found!"); } $dlink = trim($dl[0]); $filename = basename(parse_url($dlink, PHP_URL_PATH)); $this->RedirectDownload($dlink, $filename, $this->Cookies); } }
is_present($page, 'You have not verified your account yet.', 'Login Failed: Account not verified.'); $cookie = GetCookiesArr($page, $cookie); if (empty($cookie['myms'])) { html_error("Login Failed."); } $login = true; } else { html_error('Login Failed: Login/Password empty.'); } // Retrive upload ID echo "<script type='text/javascript'>document.getElementById('login').style.display='none';</script>\n<div id='info' width='100%' align='center'>Retrive upload ID</div>\n"; $page = ul_GetPage($referer, $cookie, 0, $loginUrl); $post = array(); $post['Filename'] = $lname; //<Pl guid> $guid = base_convert(jstime(), 10, 32); for ($i = 0; $i < 5; $i++) { $guid .= base_convert(rand(0, 65534), 10, 32); } $guid = 'p' . $guid . base_convert(rand(0, 31), 10, 32); // <Pl guid/> $post['name'] = $guid . strrchr($lname, '.'); $post['passProtectUpload'] = !empty($_REQUEST['up_lpassword']) ? $_REQUEST['up_lpassword'] : ''; $post['searchable'] = !empty($_REQUEST['up_searchable']) && $_REQUEST['up_searchable'] == 'yes' ? 'yes' : 'no'; $post['uploadFileDescription'] = !empty($_REQUEST['up_description']) ? $_REQUEST['up_description'] : 'Uploaded with Rapidleech.'; $post['uploadFileCategory'] = !empty($_REQUEST['up_category']) && array_key_exists($_REQUEST['up_category'], $ftypes) ? $_REQUEST['up_category'] : 'doc'; //$post['checkTOS'] = ''; //$post['Upload'] = 'Submit Query'; // Pre-Upload Check $plData = array(); $plData['uploading_files%5B0%5D%5Bid%5D'] = $guid;