当前位置: 首页>>代码示例>>PHP>>正文


PHP is_present函数代码示例

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


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


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