本文整理汇总了PHP中GetCookiesArr函数的典型用法代码示例。如果您正苦于以下问题:PHP GetCookiesArr函数的具体用法?PHP GetCookiesArr怎么用?PHP GetCookiesArr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCookiesArr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Download
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;
}
}
示例2: Download
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);
}
示例3: DownloadFree
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;
}
}
示例4: login
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 »');
$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;
}
示例5: Download
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);
}
示例6: Login
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);
}
}
示例7: login
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;
}
示例8: GetMUSites
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;
}
示例9: Download
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();
}
}
示例10: login
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();
}
}
示例11: 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);
}
示例12: Download
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;
}
示例13: AnonDL
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)));
}
}
示例14: FreeDL
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;
}
示例15: Download
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);
}
}