• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_present函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_present函数的典型用法代码示例。如果您正苦于以下问题:PHP is_present函数的具体用法?PHP is_present怎么用?PHP is_present使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_present函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: if_download_description_function

function if_download_description_function($atts, $content)
{
    $atts = shortcode_atts(array('not' => 'no', 'id' => '', 'is' => '', 'is_sensitive' => '', 'equals' => '', 'greater' => '', 'less' => '', 'search' => '', 'search_sensitive' => ''), $atts, 'if_download_description');
    if ($atts['id'] != '') {
        $post = get_post($atts['id']);
        $description = $post->post_content;
    } else {
        $description = get_the_content();
    }
    $str_length = strlen($description);
    ob_start();
    if ($atts['not'] == 'yes' || $atts['not'] == 1) {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($description, $atts['is']) && is_equals_sensitive($description, $atts['is_sensitive']) && is_present($description, $atts['search']) && is_present_sensitive($description, $atts['search_sensitive'])) {
            echo '';
        } else {
            echo do_shortcode($content);
        }
    } else {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($description, $atts['is']) && is_equals_sensitive($description, $atts['is_sensitive']) && is_present($description, $atts['search']) && is_present_sensitive($description, $atts['search_sensitive'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    }
    return ob_get_clean();
}
开发者ID:Bento4Extend,项目名称:EDD-Download-Shortcodes,代码行数:26,代码来源:if_download_description.php


示例2: Download

 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "This transfer has expired and the files are no longer available for download.");
     if (preg_match('@Location: (http(s)?:\\/\\/[^\\r\\n]+)@i', $page, $dl)) {
         //this is link that we have submit from autodownload
         $dlink = trim($dl[1]);
         $FileName = urldecode(cut_str($dlink, 'fn=', '\\r\\n'));
         $this->RedirectDownload($dlink, $FileName, 0, 0, $link);
     } else {
         if (!preg_match_all('@"DownloadUrl":"([^"]+)",@', $page, $temp)) {
             html_error("Error [Redirect Link not found!]");
         }
         $redir = array();
         foreach ($temp[1] as $k) {
             $redir[] = 'https://www.transferbigfiles.com' . $k;
         }
         if (count($redir) > 1) {
             $this->moveToAutoDownloader($redir);
             exit;
         } else {
             $page = $this->GetPage($redir[0], 0, 0, $link);
             if (!preg_match('@Location: (http(s)?:\\/\\/[^\\r\\n]+)@i', $page, $dl)) {
                 html_error('Error [Download Link not found!]');
             }
             $dlink = trim($dl[1]);
             $FileName = urldecode(cut_str($dlink, 'fn=', '\\r\\n'));
             $this->RedirectDownload($dlink, $FileName, 0, 0, $link);
             exit;
         }
     }
 }
开发者ID:SheppeR,项目名称:rapidleech,代码行数:32,代码来源:transferbigfiles_com.php


示例3: 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);
     }
 }
开发者ID:sayedharounokpay,项目名称:LikesPlanet,代码行数:29,代码来源:ultramegabit_com.php


示例4: Download

 public function Download($link)
 {
     $cookie = 'lang=english';
     $page = $this->GetPage($link, $cookie);
     is_present($page, 'The file you were looking for could not be found, sorry for any inconvenience.');
     $form = cut_str($page, '<form method="POST" action=\'\'>', '</form>');
     if (!preg_match_all('/type="hidden" name="([^"]+)" value="([^"]+)?"/', $form, $one) || !preg_match_all('/type="submit" name="(\\w+_free)" .* value="([^"]+)"/', $form, $two)) {
         html_error('Error[Form 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);
     $form = cut_str($page, '<Form name="F1" method="POST" action=""', '</Form>');
     if (!preg_match_all('/type="hidden" name="([^"]+)" value="([^"]+)?"/', $form, $match)) {
         html_error('Error[Post Data 2 not found!]');
     }
     $match = array_combine($match[1], $match[2]);
     $post = array();
     foreach ($match as $key => $value) {
         $post[$key] = $value;
     }
     $page = $this->GetPage($link, $cookie, $post, $link);
     if (!preg_match('/Location: (https?:\\/\\/[^\\r\\n]+)/i', $page, $dl)) {
         html_error('Error[Download Link not found!]');
     }
     $dlink = trim($dl[1]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie);
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:32,代码来源:filenuke_com.php


示例5: 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;
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:28,代码来源:sendspace_com.php


示例6: 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);
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:25,代码来源:vidivodo_com.php


示例7: PrepareFree

 private function PrepareFree($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "File Not Found", "The file you were looking for could not be found, sorry for any inconvenience.");
     $id = cut_str($page, 'name="id" value="', '"');
     $fname = cut_str($page, 'name="fname" value="', '"');
     $post = array();
     $post['op'] = "download1";
     $post['usr_login'] = "";
     $post['id'] = $id;
     $post['fname'] = $fname;
     $post['referer'] = $link;
     $post['method_free'] = "Free Download";
     $page = $this->GetPage($link, 0, $post, $link);
     if (preg_match('%<span id="countdown">([0-9]+)</span>%', $page, $countd)) {
         $this->CountDown($countd[1]);
     }
     $rand = cut_str($page, 'name="rand" value="', '"');
     $temp = cut_str($page, '<img alt="captcha" src="', '" />');
     $data = $this->DefaultParamArr($link, 0, $link);
     $data['step'] = "1";
     $data['id'] = $id;
     $data['rand'] = $rand;
     $this->EnterCaptcha($temp, $data);
     exit;
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:26,代码来源:azsharing_com.php


示例8: Download

 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "This file couldn't be found!", "This file doesn't exit or has been deleted.");
     $post = array();
     $post['free_download'] = "1";
     $post['free_download1.x'] = rand(0, 83);
     $post['free_download1.y'] = rand(0, 20);
     $post['free_download1'] = "1";
     $page = $this->GetPage($link, 0, $post, $link);
     preg_match('/<div id="time2wait" style="display:inline;">(\\d+)<\\/div>/', $page, $wait);
     $countdown = $wait[1];
     insert_timer($countdown, "Download is being prepared.", "", true);
     $ticket = cut_str($page, 'id="ticket" value="', '"');
     unset($post);
     $post['ticket'] = $ticket;
     $post['x'] = rand(0, 78);
     $post['y'] = rand(0, 19);
     if (!preg_match('/form method="post" action="(.*)"/', $page, $dl)) {
         html_error("Error, Download link not found bla...bla...bla...he3x");
     }
     $dlink = trim($dl[1]);
     $Url = parse_url($dlink);
     $FileName = basename($Url['path']);
     $this->RedirectDownload($dlink, $FileName, 0, $post, $link);
     exit;
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:27,代码来源:kickload_com.php


示例9: 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);
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:27,代码来源:zshare_net.php


示例10: Retrieve

 private function Retrieve($link)
 {
     global $Referer;
     $page = $this->GetPage($link);
     is_present($page, "File Not Found", "The file you were looking for could not be found");
     $id = cut_str($page, 'name="id" value="', '"');
     $fname = cut_str($page, 'name="fname" value="', '"');
     $post = array();
     $post['op'] = "download1";
     $post['usr_login'] = "";
     $post['id'] = $id;
     $post['fname'] = $fname;
     $post['referer'] = "";
     $post['method_free'] = "Free Download";
     $page = $this->GetPage($link, 0, $post, $link);
     $rand = cut_str($page, 'name="rand" value="', '"');
     if (preg_match("#You have to wait (\\d+) minutes, (\\d+) seconds till next download#", $page, $message)) {
         html_error($message[0]);
     }
     if (preg_match('#(\\d+)</span> seconds#', $page, $wait)) {
         $this->CountDown($wait[1]);
     }
     if (stristr($page, "Enter code below")) {
         preg_match('#(http:\\/\\/www\\.filezup.com\\/captchas/.+)"#', $page, $temp);
         $data = array();
         $data['step'] = '1';
         $data['link'] = $link;
         $data['id'] = $id;
         $data['rand'] = $rand;
         $data['referer'] = urlencode($link);
         $this->EnterCaptcha($temp[1], $data, 20);
         exit;
     }
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:34,代码来源:filezup_com.php


示例11: Download

 public function Download($link)
 {
     $page = $this->GetPage($link, 'lang=english');
     is_present($page, "<h2>File Not Found</h2>", 'Video not found or it was deleted.');
     is_present($page, "Video is not encoded yet.", 'Video is not encoded yet. Please wait some minutes.');
     is_present($page, "The file you were looking for could not be found");
     $page2 = cut_str($page, '<form name="F1" method="POST"', '</form>');
     //Cutting page
     if (!preg_match('@name="id" value="([^"]+)"@i', $page2, $id)) {
         html_error("Video ID not found.");
     }
     $page = $this->GetPage("http://movzap.com/xml/{$id[1]}.xml", 'lang=english');
     if (!preg_match('@<title><!\\[CDATA\\[([^\\[|\\]]+)\\]\\]></title>@i', $page, $title)) {
         html_error("Video Title not found.");
     }
     $page = $this->GetPage("http://movzap.com/xml2/{$id[1]}.xml", 'lang=english');
     if (!preg_match('@<hd\\.file><!\\[CDATA\\[([^\\[|\\]]+)\\]\\]></hd\\.file>@i', $page, $encrypted)) {
         if (!preg_match('@<file><!\\[CDATA\\[([^\\[|\\]]+)\\]\\]></file>@i', $page, $encrypted)) {
             html_error("Encrypted link not found.");
         }
     }
     $down = $this->decryptme(substr($encrypted[1], 0, -6)) or $down = $this->decryptme($encrypted[1]);
     if ($down === false) {
         html_error("Cannot decrypt download link");
     }
     if (!preg_match('@\\.[^\\.]+$@i', basename($down), $ext)) {
         $ext = array('.mp4');
     }
     $badchars = '<>:"/\\|?*\'@#+~{}[]^';
     $fname = str_replace(str_split($badchars), "_", trim($title[1])) . $ext[0];
     $this->RedirectDownload($down . "?start=0", $fname, 0, 0, 0, $fname);
 }
开发者ID:SheppeR,项目名称:rapidleech,代码行数:32,代码来源:movzap_com.php


示例12: Download

 public function Download($link)
 {
     if (!preg_match('@://(?:[^/]+\\.)?tune\\.pk/video/(\\d+)@i', $link, $vid)) {
         html_error('Video ID not found. Check url.');
     }
     $page = $this->GetPage('http://tune.pk/video/' . $vid[1] . '/');
     is_present($page, 'Video does not exist');
     is_present($page, '404 Page not found');
     if (!preg_match('@var \\s*video_title\\s*=\\s*\'([^\']+)\';@i', $page, $title)) {
         html_error('Video title not found.');
     }
     $title = str_replace(str_split('<>:"/\\|?*\'@#+~{}[]^'), '_', html_entity_decode(trim($title[1]), ENT_QUOTES));
     if (stripos($page, 'watch_video_hd_button') !== false && preg_match('@var \\s*hq_video_file\\s*=\\s*\'(http://[^\']+)\'@i', $page, $dl)) {
         $title .= '_HQ';
     } elseif (!preg_match('@var \\s*normal_video_file\\s*=\\s*\'(http://[^\']+)\'@i', $page, $dl)) {
         html_error('Download link not found.');
     }
     $dllink = $dl[1];
     $ext = strrchr($dllink, '.');
     if (empty($ext)) {
         $ext = '.flv';
     }
     $fname = $title . $ext;
     $this->RedirectDownload($dllink, $fname);
 }
开发者ID:sayedharounokpay,项目名称:LikesPlanet,代码行数:25,代码来源:tune_pk.php


示例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;
 }
开发者ID:mewtutorial,项目名称:rapidleech-ultimate,代码行数:33,代码来源:easy_share_com.php


示例14: Download

 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "File Not Found", "File Not Found");
     is_present($page, "maintenance mode", "This server is in maintenance mode. Retry in a few minute.");
     $id = cut_str($page, 'name="id" value="', '"');
     $FileName = cut_str($page, 'name="fname" value="', '"');
     $post = array();
     $post['op'] = "download1";
     $post['usr_login'] = "";
     $post['id'] = $id;
     $post['fname'] = $FileName;
     $post['referer'] = $link;
     $post['method_free'] = "Free Download";
     $page = $this->GetPage($link, 0, $post, $link);
     $rand = cut_str($page, 'name="rand" value="', '"');
     unset($post);
     $post['op'] = "download2";
     $post['id'] = $id;
     $post['rand'] = $rand;
     $post['referer'] = $link;
     $post['method_free'] = "Free Download";
     $post['method_premium'] = "";
     $post['down_script'] = "1";
     $page = $this->GetPage($link, 0, $post, $link);
     if (!preg_match('/Location: (.*)/i', $page, $dl)) {
         html_error("Error: Download link not found!");
     }
     $Url = parse_url($dl[1]);
     if (!$FileName) {
         $FileName = basename($Url['path']);
     }
     $this->RedirectDownload($dl[1], $FileName, 0, 0, $link);
     exit;
 }
开发者ID:SheppeR,项目名称:rapidleech,代码行数:35,代码来源:uploadbaz_com.php


示例15: 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);
 }
开发者ID:Transcodes,项目名称:rapidleech,代码行数:33,代码来源:nowvideo_sx.php


示例16: SendLogin

function SendLogin($post)
{
    global $_T8, $referer, $cookie, $pauth;
    $page = geturl($_T8['domain'], $_T8['port'], $_T8['path'] . '?op=login', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);
    is_page($page);
    if (!($form = cut_str($page, '<form', '</form>'))) {
        html_error('Cannot find login form.');
    }
    if (!($post['rand'] = cut_str($page, 'name="rand" value="', '"'))) {
        html_error('Login form "rand" not found.');
    }
    if (substr_count($form, "<span style='position:absolute;padding-left:") > 3 && preg_match_all("@<span style='[^\\'>]*padding-left\\s*:\\s*(\\d+)[^\\'>]*'[^>]*>((?:&#\\w+;)|(?:\\d))</span>@i", $form, $txtCaptcha)) {
        // Text Captcha (decodeable)
        $txtCaptcha = array_combine($txtCaptcha[1], $txtCaptcha[2]);
        ksort($txtCaptcha, SORT_NUMERIC);
        $txtCaptcha = trim(html_entity_decode(implode($txtCaptcha), ENT_QUOTES, 'UTF-8'));
        $post['code'] = $txtCaptcha;
    } else {
        html_error('Login captcha not found.');
    }
    // Don't remove this sleep or you will only see "Error Decoding Captcha. [Login]"
    sleep(3);
    // 2 or 3 seconds.
    $page = geturl($_T8['domain'], $_T8['port'], $_T8['path'] . '?op=login', $referer, $cookie, $post, 0, $_GET['proxy'], $pauth);
    is_page($page);
    is_present($page, '>Wrong captcha code<', 'Error: Error Decoding Captcha. [Login]');
    return $page;
}
开发者ID:Transcodes,项目名称:rapidleech,代码行数:28,代码来源:ex-load.com.php


示例17: 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;
     }
 }
开发者ID:SheppeR,项目名称:rapidleech,代码行数:29,代码来源:hellshare_com.php


示例18: Download

 public function Download($link)
 {
     if (!preg_match('@(https?://(?:[\\w\\-]+\\.)+[\\w\\-]+(?:\\:\\d+)?/)(?:file/|v/|embed\\.php\\?id=)(\\w+)@i', $link, $vid)) {
         html_error('Invalid Link.');
     }
     $page = $this->GetPage($link);
     is_present($page, 'The video no longer exists', 'Video not found or it was deleted.');
     is_present($page, 'The file is being transfered', 'Video is temporarily unavailable.');
     $embed = $this->GetPage("{$vid[1]}embed.php?id={$vid[2]}&autoplay=1");
     if (!preg_match('@<h4 class="title">\\s*([^"<>]+)\\s*</h4>@i', $page, $title)) {
         html_error('Error: Video title not found.');
     }
     if (!preg_match('@domain\\s*:\\s*"([^"]+)"\\s*,\\s*key\\s*:\\s*"([^"]+)"@', $embed, $matches)) {
         html_error('Error: Download link not found.');
     }
     $url = $matches[1] . '/api/player.api.php?user=undefined&codes=1&file=' . $vid[2] . '&pass=undefined&key=' . urlencode($matches[2]);
     $page2 = $this->GetPage($url);
     is_present($page, ' is being transfered', 'Video is temporarily unavailable');
     if (!preg_match('@url=(http://[^&]+)@', urldecode($page2), $downl)) {
         html_error('Error: Download link not found.');
     }
     if (!preg_match('@\\.(?:mp4|flv|webm|avi)$@i', basename($downl[1]), $ext)) {
         $ext = array('.flv');
     }
     $filename = preg_replace('@\\.(mp4|flv|mkv|webm|wmv|(m2)?ts|rm(vb)?|mpe?g?|vob|avi|[23]gp)$@i', '', preg_replace('@[^ A-Za-z_\\-\\d\\.,\\(\\)\\[\\]\\{\\}&\\!\'\\@\\%\\#]@u', '_', html_entity_decode(trim($title[1]), ENT_QUOTES, 'UTF-8')));
     $filename .= sprintf(' [Cloudy][%s]%s', $vid[2], $ext[0]);
     $this->RedirectDownload($downl[1], $filename, 0, 0, 0, $filename);
 }
开发者ID:phongtnit,项目名称:rapidleech,代码行数:28,代码来源:cloudy_ec.php


示例19: 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();
     }
 }
开发者ID:Transcodes,项目名称:rapidleech,代码行数:27,代码来源:zippyshare_com.php


示例20: 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;
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:29,代码来源:real_debrid_com.php



注:本文中的is_present函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_preview函数代码示例发布时间:2022-05-15
下一篇:
PHP is_pppoe_server_enabled函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap