本文整理汇总了PHP中GetCookies函数的典型用法代码示例。如果您正苦于以下问题:PHP GetCookies函数的具体用法?PHP GetCookies怎么用?PHP GetCookies使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCookies函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DownloadPremium
private function DownloadPremium($link)
{
global $premium_acc, $Referer;
$post = array();
$post["email"] = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["uploaded_to"]["user"];
$post["password"] = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["uploaded_to"]["pass"];
$page = $this->GetPage('http://uploaded.to/login', 0, $post);
if (strpos($page, "Login failed")) {
html_error("Login Failed , Bad username/password combination.", 0);
}
$cook = GetCookies($page);
$id = trim(substr($link, 24, 6));
$newHref = "http://uploaded.to/file/" . $id . "/?redirect";
$post = array();
$page = $this->GetPage($newHref, $cook, $post, $Referer);
preg_match('/Location: (.*)/', $page, $newredir);
$Href = trim($newredir[1]);
if (strpos($Href, "view=error_fileremoved")) {
html_error("Error getting Download Link", 0);
}
$Url = parse_url($Href);
$FileName = !$FileName ? basename($Url["path"]) : $FileName;
$this->RedirectDownload($Href, $FileName, $cook);
exit;
}
示例2: Free
private function Free($link)
{
if ($_REQUEST['step'] == '1') {
$post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
$post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
$postlink = urldecode($_POST['link']);
$cookie = urldecode($_POST['cookie']);
$challenge = $_POST['challenge'];
$this->page = $this->GetPage($postlink, $cookie, $post, $link);
} else {
$cookie = GetCookies($this->page);
if (!preg_match("@\\{ xmlobject\\.open\\('POST', '([^']+)',@i", $this->page, $rd)) {
echo "<center><font color='red'><b>No Direct Link found, proceed to filehost!</b></font></center>";
if (!preg_match("/progress\\/\\?d=" . $this->id . "&r=/", $this->page, $dm)) {
html_error('Can\'t find id link!');
}
$page = $this->GetPage('http://www.multiupload.nl/' . $dm[0] . time(), $cookie, 0, $link);
if (!preg_match_all('/url":"([^\\r\\n"]+)"/', $page, $tmp)) {
html_error('Error[Unknown Page Response]');
}
$check = '';
foreach ($tmp[1] as $k => $v) {
$check .= $this->GetPage(str_replace('\\', '', $v));
}
if (!preg_match_all('/location: (http:\\/\\/[^\\r\\n]+)/i', $check, $match)) {
html_error('Can\'t find true filehost link!');
}
$this->Submit($match[1]);
exit;
}
$postlink = $link . $rd[1];
if (!preg_match('@Recaptcha\\.create\\("([^"]+)",@i', $this->page, $cap)) {
html_error("Error: Captcha id not found!");
}
//send the captcha data
$data = $this->DefaultParamArr($postlink, $cookie);
$data['step'] = '1';
$data['challenge'] = $cap[1];
//incase we have input the wrong captcha
$this->Show_reCaptcha($cap[1], $data);
exit;
}
if (!preg_match('@\\{"([^"]+)":"([^"]+)"\\}@', $this->page, $check)) {
html_error("Error: Unknown Response Page!");
}
switch ($check[1]) {
case 'response':
echo "<center><font color='red'><b>The captcha wasn't entered correctly. Please try again</b></font></center>";
$data = $this->DefaultParamArr($postlink, $cookie);
$data['step'] = '1';
$data['challenge'] = $challenge;
$this->Show_reCaptcha($challenge, $data);
break;
case 'href':
$dlink = str_replace('\\', '', $check[2]);
$filename = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
break;
}
}
示例3: Login
private function Login($auth = false)
{
global $premium_acc;
if (!$auth) {
if (!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"])) {
$user = $_REQUEST["premium_user"];
$pass = $_REQUEST["premium_pass"];
} else {
$user = $premium_acc["real-debrid_com"]['user'];
$pass = $premium_acc["real-debrid_com"]['pass'];
}
if (empty($user) || empty($pass)) {
html_error("Username or password is empty, you need to insert your login detail!");
}
$page = $this->GetPage($this->posturl . "ajax/login.php?user=" . urlencode($user) . "&pass=" . urlencode($pass) . "", "lang=en", 0, $this->posturl . "\r\nX-Requested-With: XMLHttpRequest");
$cookie = GetCookies($page) . "; lang=en";
is_present($page, 'Your login informations are incorrect !');
} elseif (strlen($auth) == 114) {
$cookie = "auth={$auth}; lang=en";
} else {
html_error("[Cookie] Invalid cookie (" . strlen($auth) . " != 114).");
}
//check account
$page = $this->GetPage($this->posturl . "account", $cookie, 0, $this->posturl);
is_present($page, "<h3>403 - Forbidden</h3>", "Account invalid!");
is_present($page, 'A dedicated server has been detected and your account will not be Premium on this IP address.');
is_present($page, '<strong>Free</strong>', 'Account Free, login not validated!');
return $cookie;
}
示例4: Prepare_Free
private function Prepare_Free($link)
{
$page = $this->GetPage($link);
$cookie = GetCookies($page);
is_present($page, "Location: /deleted/", 'Error: File not found.');
if (preg_match('@You have to wait: [^\\.]+.@i', $page, $dlt)) {
html_error("Download limit exceeded: {$dlt[0]}");
}
if (!preg_match('@fileover\\.net/(\\d+)@i', $link, $lid)) {
html_error('Error: Link ID not found. Malformed link?');
}
if (!preg_match('@"wseconds">(\\d+)<@i', $page, $cD)) {
html_error('Error: Timer not found.');
}
$page = $this->GetPage("http://fileover.net/ax/timereq.flo?{$lid[1]}", $cookie);
if (!preg_match('@"hash":"([^"]+)"@i', $page, $lhs)) {
html_error('Error: Timehash not found.');
}
$this->CountDown($cD[1] + 1);
$page = $this->GetPage("http://fileover.net/ax/timepoll.flo?file={$lid[1]}&hash={$lhs[1]}", $cookie);
if (!preg_match('@/challenge\\?k=([^"|\']+)(?:"|\')@i', $page, $rpid)) {
html_error('Error: Captcha not found.');
}
$data = $this->DefaultParamArr($link, $cookie);
$data['step'] = '1';
$data['fo_file'] = $lid[1];
$data['fo_hash'] = $lhs[1];
$this->Show_reCaptcha($rpid[1], $data);
}
示例5: Download
public function Download($link)
{
global $premium_acc, $Referer;
$page = $this->GetPage($link);
is_present($page, "Removed", "The file has been removed or has been expired!");
if (stristr($page, 'class="handlinkblocked"')) {
$pass = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["fileflyer_com"]["pass"];
if (empty($pass)) {
html_error("This link required premium account!");
}
if (!preg_match('/<form name="form1" method="post" action="(.*)"/U', $page, $pre)) {
html_error('Error: Premium link not found?');
}
$link = $pre[1];
$post = array();
$post['__EVENTTARGET'] = "";
$post['__EVENTARGUMENT'] = "";
$post['__VIEWSTATE'] = urlencode(cut_str($page, 'id="__VIEWSTATE" value="', '"'));
$post['__EVENTVALIDATION'] = urlencode(cut_str($page, 'id="__EVENTVALIDATION" value="', '"'));
$post['SMSButton'] = "Go";
$post['Password'] = $pass;
$post['TextBox1'] = "";
$page = $this->GetPage($link, 0, $post, $Referer);
is_notpresent($page, "Access enabled", "Invalid premium codes");
}
$cookie = GetCookies($page);
if (!preg_match('@http:\\/\\/.+fileflyer\\.com\\/d\\/[^"]+@', $page, $dl)) {
html_error('Error: Download link not found, plugin need to be updated!');
}
$dlink = trim($dl[0]);
$filename = parse_url($dlink);
$FileName = basename($filename['path']);
$this->RedirectDownload($dlink, $FileName, $cookie, 0, $Referer);
exit;
}
示例6: Download
public function Download($link)
{
$page = $this->GetPage($link);
is_present($page, "file link that you requested is not valid", "The file link that you requested is not valid. Please contact link publisher or try to make a search");
is_present($page, "File download limit has been exceeded.", "Free download limit has been exceeded. Try again later.");
$cookie = GetCookies($page);
if (isset($_GET["step"]) && $_GET["step"] == "1") {
$post = array();
$post["userPass2"] = $_POST['userPass2'];
$cookie = urldecode($_POST['cookie']);
$page = $this->GetPage($link, $cookie, $post, $link);
is_present($page, "enter password to access this file", "The password you have entered is not valid.");
} elseif (stristr($page, 'enter password to access this file')) {
global $PHP_SELF;
$data = $this->DefaultParamArr($link, $cookie);
$data['step'] = 1;
echo "\n<form name='dl_password' action='{$PHP_SELF}' method='post'>\n";
foreach ($data as $name => $value) {
echo "<input type='hidden' name='{$name}' id='{$name}' value='{$input}' />\n";
}
echo "<h4>Enter password here: <input type='text' name='userPass2' id='filepass' size='13' /> <input type='submit' onclick='return check()' value='Download File' /></h4>\n";
echo "<script language='JavaScript'>\nfunction check() {\nvar pass=document.getElementById('filepass');\nif (pass.value == '') { window.alert('You didn\\'t enter the password'); return false; }\nelse { return true; }\n}\n</script>\n";
echo "</form>\n</body>\n</html>";
exit;
}
$this->getCountDown($page);
// Retrieve download link
if (preg_match('/dc(\\d+)\\.2shared\\.com\\/download\\/([^\'|\\"|\\<|\\>|\\r|\\n]+)/i', $page, $L)) {
$dllink = "http://dc" . $L[1] . ".2shared.com/download/" . $L[2];
$FileName = urldecode(basename(parse_url($dllink, PHP_URL_PATH)));
} else {
html_error("Download-link not found.");
}
$this->RedirectDownload($dllink, $FileName, $cookie);
}
示例7: DownloadPremium
public function DownloadPremium($link, $user, $pass)
{
$rootURL = 'http://www.uploadstation.com/';
if (!preg_match('#http://(?:www\\.)?uploadstation.com/file/(.+)#i', $link)) {
html_error("Invalid URL");
} else {
$login = array('loginFormSubmit' => 'Login', 'loginUserName' => $user, 'loginUserPassword' => $pass, 'autoLogin' => 'on');
$page = $this->getPage("{$rootURL}login.php", 0, $login);
$cookie = GetCookies($page);
is_notpresent($cookie, "Cookie=", "Login error. Cookie not found.");
$page = $this->GetPage("{$rootURL}dashboard.php", $cookie, 0, $rootURL);
is_present($page, "acctype_free", "Error:Not Premium [0]");
is_notpresent($page, "Expiry date: ", "Error:Not Premium [1]");
$page = $this->GetPage($link, $cookie, array('download' => 'premium'));
if (stristr($page, "HTTP/1.1 200 OK")) {
$page = $this->GetPage($this->link, $cookie, array('download' => 'premium'));
}
if (preg_match('/Location: (http:\\/\\/d\\d+.uploadstation.com[^\\r\\n]+)/i', $page, $tmpDownload)) {
$download_link = $tmpDownload[1];
} else {
is_present($page, "You are not able to download", "Error:Not Premium [2]");
}
$downloadElements = parse_url($download_link);
$filename = urldecode(basename($downloadElements["path"]));
$this->RedirectDownload($download_link, $filename, $cookie);
}
}
示例8: Download
public function Download($link)
{
if ($_REQUEST['step'] == 'Recaptcha') {
$post['op'] = $_POST['op'];
$post['id'] = $_POST['id'];
$post['rand'] = $_POST['rand'];
$post['referer'] = $_POST['referer'];
$post['method_free'] = $_POST['method_free'];
$post['method_premium'] = '';
$post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
$post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
$post['down_direct'] = $_POST['down_direct'];
$link = urldecode($_POST['link']);
$cookie = urldecode($_POST['cookie']);
$page = $this->GetPage($link, $cookie, $post, $link);
} else {
$page = $this->GetPage($link);
is_present($page, 'The file you were looking for could not be found, sorry for any inconvenience.');
$cookie = GetCookies($page);
$form = cut_str($page, '<form method="POST" action=\'\'>', '</form>');
if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)?">/', $form, $one) || !preg_match_all('/<input type="submit" name="(\\w+_free)" value="([^"]+)">/', $form, $two)) {
html_error('Error[Post Data 1 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($link, $cookie, $post, $link);
}
if (stripos($page, 'Type the two words')) {
$form = cut_str($page, '<form name="F1" method="POST"', '</form>');
if (stripos($form, cut_str($form, '<div class="err">', '</div>'))) {
echo "<center><font color='red'><b>Wrong Captcha, Please rety!</b></font></center>";
}
if (!preg_match('/(\\d+)<\\/span> seconds/', $form, $wait)) {
html_error('Error[Timer not found!]');
}
$this->CountDown($wait[1]);
if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)?">/', $form, $match)) {
html_error('Error[Post Data 2 not found!]');
}
$match = array_combine($match[1], $match[2]);
$data = array_merge($this->DefaultParamArr($link, $cookie), $match);
$data['step'] = 'Recaptcha';
if (!preg_match('/\\/api\\/challenge\\?k=([^"]+)"/', $form, $c)) {
html_error('Error[Captcha Data not found!]');
}
$this->Show_reCaptcha($c[1], $data);
exit;
}
is_present($page, cut_str($page, '<div class="err">', '<br>'));
if (!preg_match('/https?:\\/\\/[a-zA-Z]+\\d+\\.4savefile\\.com\\/[^\\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, $cookie, 0, $link);
exit;
}
示例9: Download
public function Download($link)
{
$page = $this->GetPage($link);
if (preg_match('/(\\d+)<\\/span> seconds/', $page, $wait)) {
$this->CountDown($wait[1]);
}
$free = 'http://yunfile.com' . cut_str($page, '<a id="downpage_link" href="', '"');
$page = $this->GetPage($free, 0, 0, $link);
$cookie = GetCookies($page);
if (!preg_match('/setCookie\\("(v\\w+)", "(\\w+)"/', $page, $ca)) {
html_error('Additional Cookie not found!');
}
$cookie = $cookie . "; {$ca['1']}={$ca['2']}";
$form = cut_str($page, '<form class="tform" ', '</form>');
$dlink = cut_str($form, 'action="', '" method="post"');
$filename = basename(parse_url($dlink, PHP_URL_PATH));
if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)" \\/>/', $form, $match)) {
html_error('Error : Post Data not found!');
}
$match = array_combine($match[1], $match[2]);
$post = array();
foreach ($match as $key => $value) {
$post[$key] = $value;
}
$this->RedirectDownload($dlink, $filename, $cookie, $post, $link);
exit;
}
示例10: Retrieve
private function Retrieve($link)
{
$page = $this->GetPage($link);
is_present($page, "The file you are looking for is not available");
is_present($page, "has been removed because we have received", "The file you are looking was removed");
is_present($page, "<strong>DOWNLOAD LIMIT</strong>", "Download limit reached... Please try again 8-10 hours later.");
$cookie = GetCookies($page);
if (!($fname = cut_str($page, '<strong title="', '"'))) {
html_error("Filename not found.", 0);
}
if (!preg_match('/name="fileId" value="([^"]+)"/i', $page, $fileid)) {
html_error("Link fileId not found.", 0);
}
$link = 'http://www.gigasize.com/get/' . $fileid[1];
if (!($k = cut_str($page, "adscaptcha.com/Get.aspx?", "'"))) {
html_error("Error getting CAPTCHA data.", 0);
}
$page = $this->GetPage("http://api.adscaptcha.com/Get.aspx?{$k}");
if (!($ch = cut_str($page, "challenge: '", "'"))) {
html_error("Error getting CAPTCHA image.", 0);
}
$data = $this->DefaultParamArr($link, $cookie);
$data['step'] = '1';
$data['fileId'] = urlencode($fileid[1]);
$data['fname'] = urlencode($fname);
$data['adscaptcha_challenge_field'] = urlencode($ch);
$this->EnterCaptcha("http://api.adscaptcha.com/Challenge.aspx?cid={$ch}&w=180", $data, 25);
exit;
}
示例11: Download
public function Download($link)
{
if (stristr($link, '/video/')) {
$link = str_replace('/video/', '/download/', $link);
} elseif (stristr($link, '/audio/')) {
$link = str_replace('/audio/', '/download/', $link);
}
$page = $this->GetPage($link);
//textarea($page, $cols, $rows, true);
is_present($page, '/file-404.html', 'File not found!');
$cookie = GetCookies($page);
$post = array('referer2' => cut_str($page, 'id="referer2" value="', '"'), 'download' => '1', 'imageField.x' => rand(0, 153), 'imageField.y' => rand(0, 25));
$page = $this->GetPage($link, $cookie, $post, $link);
$cookie = $cookie . "; " . GetCookies($page);
if (!preg_match('#here[|](\\d+)[|]class#', $page, $wait)) {
html_error('Error: Timer not found!');
}
$this->CountDown($wait[1]);
$dlink = cut_str($page, 'var link_enc=new Array(', ');');
$dlink = preg_replace('@[,\']@i', '', $dlink);
if (!isset($dlink)) {
html_error('Error: Download link not found!');
}
$filename = parse_url($dlink);
$FileName = basename($filename['path']);
$this->RedirectDownload($dlink, $FileName, $cookie, 0, $link);
}
示例12: Retrieve
private function Retrieve($link)
{
$page = $this->GetPage($link);
if (preg_match("#Location: (.+)#", $page, $temp)) {
$link = "http://www.share-online.biz" . $temp[1];
$page = $this->GetPage($link);
}
$Cookies = GetCookies($page);
$post = array();
$post['dl_free'] = "1";
$post['choice'] = "free";
$page = $this->GetPage(trim($link) . "/free/", $Cookies, $post, $link);
//$nfo = getinfo(cut_str($page, 'var nfo="', '"'));
is_present($page, "failure/full/", "No free slots for free users");
if (!preg_match("#var wait=(\\d+)#", $page, $count)) {
html_error("Error 0x01: Plugin is out of date");
}
$dl = cut_str($page, 'dl="', '"');
insert_timer($count[1]);
$data = array();
$data['dl'] = $dl;
$data['captchaid'] = str_replace("chk||", "", base64_decode($dl));
$data['Cookies'] = $Cookies;
$data['checkcaptchaurl'] = str_replace("///", "/free/captcha/", cut_str($page, ";var url='", "'"));
$data['step'] = 'captcha';
//overwrite step=1
$this->Recaptcha($link, "6LdatrsSAAAAAHZrB70txiV5p-8Iv8BtVxlTtjKX", "share-online", $data);
exit;
}
示例13: DownloadPremium
private function DownloadPremium($link)
{
global $premium_acc, $pauth, $Referer;
// Getting file name
$page = $this->GetPage($link, 0, 0, 0, $pauth);
is_present($page, 'File was deleted');
is_present($page, 'File not found');
$FileName = trim(cut_str($page, "<title>Download ", ","));
// Getting file name end
// login
$login = "http://www.easy-share.com/accounts/login";
$post["login"] = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["easyshare"]["user"];
$post["password"] = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["easyshare"]["pass"];
$post["remember"] = "1";
$page = $this->GetPage($login, 0, $post, "http://www.easy-share.com/", $pauth);
$cook = GetCookies($page);
// end login
is_notpresent($cook, "PREMIUM", "Login failed<br>Wrong login/password?");
$page = $this->GetPage($link, $cook, 0, 0, $pauth);
is_present($page, 'File was deleted');
is_present($page, 'File not found');
if (!isset($FileName) || $FileName == "") {
$Url = parse_url($link);
$FileName = !$FileName ? basename($Url["path"]) : $FileName;
}
preg_match('/Location:.+?\\r/i', $page, $loca);
$redir = rtrim($loca[0]);
preg_match('/http:.+/i', $redir, $loca);
$Href = trim($loca[0]);
$cookie = $cook . "; " . $this->BiscottiDiKaox($page);
$this->RedirectDownload($Href, $FileName, $cookie, 0, $Referer, 0, $pauth);
exit;
}
示例14: DownloadPremium
private function DownloadPremium($link)
{
global $premium_acc;
$page = $this->GetPage("https://id.megaplus.vn/login?service=http%3A%2F%2Fshare.vnn.vn%2Fmegavnnplus.php%3Fservice%3Dlogin");
$Cookies = GetCookies($page);
$lt = cut_str($page, 'name="lt" value="', '"');
$post = array();
$post["username"] = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["megashare_vn"]["user"];
$post["password"] = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["megashare_vn"]["pass"];
$post["lt"] = $lt;
$post["_eventId"] = "submit";
$post["submit"] = "%C3%90%C4%82NG+NH%E1%BA%ACP+";
$page = $this->GetPage("https://id.megaplus.vn/login?service=http%3A%2F%2Fshare.vnn.vn%2Fmegavnnplus.php%3Fservice%3Dlogin", $Cookies, $post);
$Cookies .= "; " . GetCookies($page);
if (!preg_match("#Location: (.*)#i", $page, $tlink)) {
html_error("Error 1x01: Plugin is out of date");
}
$page = $this->GetPage(trim($tlink[1]), $Cookies);
$tmp = explode(";", GetCookies($page));
$Cookies .= "; " . $tmp[1];
$page = $this->GetPage($link, $Cookies, 0, $link);
if (!preg_match("#location: (.*)#i", $page, $tlink)) {
html_error("Error 1x02: Plugin is out of date");
}
$page = $this->GetPage(trim($tlink[1]), $Cookies, 0, $link);
if (!preg_match('#http://.+8080[^"]+#', $page, $dlink)) {
html_error("Error 1x03: Plugin is out of date");
}
$Url = parse_url($dlink[0]);
$FileName = basename($Url['path']);
$this->RedirectDownload($dlink[0], $FileName, $Cookies);
exit;
}
示例15: Download
public function Download($link)
{
global $options;
if ($_REQUEST['captcha'] != '') {
$post['op'] = $_POST['op'];
$post['id'] = $_POST['id'];
$post['rand'] = $_POST['rand'];
$post['referer'] = $_POST['referer'];
$post['method_free'] = 'Free Download';
$post['method_premium'] = '';
$post['down_direct'] = '1';
$post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
$post['recaptcha_response_field'] = $_POST['captcha'];
$link = urldecode($_POST['link']);
$cookies = urldecode($_POST['cookies']);
$page = $this->GetPage($link, $cookies, $post);
} else {
$page = $this->GetPage($link);
is_present($page, 'http://www.hugefiles.net/404.html', 'File Not Found');
$cookies = GetCookies($page);
}
if (strpos($page, 'Type the two words:') || strpos($page, 'Wrong captcha')) {
if (preg_match('#(\\d+)<\\/span> seconds#', $page, $wait)) {
$this->CountDown($wait[1]);
}
if (strpos($page, 'Wrong captcha')) {
echo '<br><div style="color:#F00; font-size:16px; font-weight:bold;">Wrong Captcha</div>';
}
$form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
if (!preg_match('#api\\/challenge\\?k=([^"]+)"#', $page, $cp)) {
html_error("Error get Data Captcha");
}
if (!preg_match_all('#<input type="hidden" name="([^"]+)" value="([^"]+)?">#', $form, $dt)) {
html_error("Error get Data Form Download");
}
$data = array_combine($dt[1], $dt[2]);
$page = $this->GetPage("http://www.google.com/recaptcha/api/challenge?k=" . $cp[1]);
$sr = cut_str($page, "challenge : '", "'");
$img = "http://www.google.com/recaptcha/api/image?c=" . $sr;
$page = $this->GetPage($img);
$head = strpos($page, "\r\n\r\n");
$img = substr($page, $head + 4);
write_file($options['download_dir'] . "upafile_captcha.jpg", $img);
$data['recaptcha_challenge_field'] = $sr;
$data['link'] = urlencode($link);
$data['cookies'] = urlencode($cookies);
$this->EnterCaptcha($options['download_dir'] . "upafile_captcha.jpg", $data, 20);
exit;
}
is_present($page, cut_str($page, '<div class="err">', '</div>'));
if (!preg_match('#http://(\\w+).upafile.com:([^\'|"]+)#', $page, $dl)) {
html_error("Cannot find Download Link");
}
$dlink = trim($dl[0]);
$filename = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $filename, 0, 0, $link);
exit;
}