Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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;
 }
 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);
     }
 }
Esempio n. 5
0
 private function FreeDL()
 {
     $post = array('submit' => 'Download');
     $page = $this->GetPage($this->link, $this->cookie, $post);
     is_present($page, 'you can only download one file at a time');
     $this->cookie = GetCookiesArr($page, $this->cookie);
     if (preg_match($this->DLRegexp, $page, $dl)) {
         return $this->RedirectDownload($dl[0], empty($dl[2]) ? 'T8_1f_f2' : urldecode(parse_url($dl[0], PHP_URL_PATH)));
     }
     is_present($page, 'you must wait between downloads', 'You must wait 15 minutes between downloads');
     if (!preg_match('@[\\s,;]var\\s+count\\s*=\\s*(\\d+)\\s*;@i', $page, $cD)) {
         html_error('Countdown not found.');
     }
     if ($cD[1] > 0) {
         $this->CountDown($cD[1]);
     }
     $post = array();
     $post['submit'] = cut_str($this->page, 'name="submit" value="', '"');
     $post['t'] = cut_str($this->page, 'name="t" value="', '"');
     if (empty($post['submit'])) {
         $post['submit'] = 'Show the download link';
     }
     if (empty($post['t'])) {
         html_error('Form data not found.');
     }
     $page = $this->GetPage($this->link, $this->cookie, $post);
     $this->cookie = GetCookiesArr($page, $this->cookie);
     if (!preg_match($this->DLRegexp, $page, $dl)) {
         html_error('Download Link Not Found.');
     }
     return $this->RedirectDownload($dl[0], empty($dl[2]) ? 'T8_1f_f1' : urldecode(parse_url($dl[0], PHP_URL_PATH)));
 }
Esempio n. 6
0
 function get_list($param)
 {
     $talk_list = array();
     $lids = array();
     $uids = array();
     $guests = array();
     $time = time();
     extract($param);
     $limit_sql = '';
     $order_sql = '';
     $where_sql = ' WHERE 1=1 ';
     if ($where) {
         $where_sql .= ' AND ' . $where;
     }
     if ($order) {
         $order_sql .= $order;
     }
     if ($limit) {
         $limit_sql = ' LIMIT ' . $limit;
     }
     $total_record = DB::result_first("SELECT COUNT(*) FROM " . DB::table('talk') . " {$where_sql}");
     if ($total_record > 0) {
         if ($param['perpage']) {
             $page_arr = page($total_record, $param['perpage'], $param['page_url'], array('return' => 'array'));
             $limit_sql = $page_arr['limit'];
         } else {
             if ($param['limit']) {
                 $limit_sql = ' LIMIT ' . $param['limit'];
             }
         }
         $query = DB::query("SELECT * FROM " . DB::table('talk') . " {$where_sql} {$order_sql} {$limit_sql}");
         while ($value = DB::fetch($query)) {
             if ($value['starttime'] > $time) {
                 $value['status_css'] = 'ico_notyet';
                 $value['status'] = '未开始';
             } elseif ($value['endtime'] < $time) {
                 $value['status_css'] = 'ico_complete';
                 $value['status'] = '已完成';
             } else {
                 $value['status_css'] = 'ico_ongoing';
                 $value['status'] = '进行中';
             }
             $value['datetime'] = date('Y-m-d H:i', $value['starttime']) . ' - ' . date('Y-m-d H:i', $value['endtime']);
             if (date('Y-m-d', $value['starttime']) != date('Y-m-d', $value['endtime'])) {
                 $value['ldate'] = date('m-d H:i', $value['starttime']) . '—' . date('m-d H:i', $value['endtime']);
             } else {
                 $value['ldate'] = date('Y-m-d H:i', $value['starttime']) . '-' . date('H:i', $value['endtime']);
             }
             $value['shortname'] = cut_str($value['talkname'], 18);
             $talk_list[$value['lid']] = $value;
             $lids[] = $value['lid'];
         }
         $guestall = $this->Getguest($lids);
         foreach ($talk_list as $key => $val) {
             $talk_list[$key] = array_merge($talk_list[$key], $guestall[$key]);
         }
         $info = array('list' => $talk_list, 'count' => $total_record, 'page' => $page_arr);
         return $info;
     }
 }
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;
}
Esempio n. 8
0
 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;
     }
 }
Esempio n. 9
0
function tpl_function_qishi_link($params, &$smarty)
{
    global $db, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "列表名":
                $aset['listname'] = $a[1];
                break;
            case "显示数目":
                $aset['row'] = $a[1];
                break;
            case "开始位置":
                $aset['start'] = $a[1];
                break;
            case "文字长度":
                $aset['len'] = $a[1];
                break;
            case "填补字符":
                $aset['dot'] = $a[1];
                break;
            case "类型":
                $aset['linktype'] = $a[1];
                break;
            case "调用名称":
                $aset['alias'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['listname'] = isset($aset['listname']) ? $aset['listname'] : "list";
    $aset['row'] = isset($aset['row']) ? intval($aset['row']) : 60;
    $aset['start'] = isset($aset['start']) ? intval($aset['start']) : 0;
    $aset['len'] = isset($aset['len']) ? intval($aset['len']) : 8;
    $aset['linktype'] = isset($aset['linktype']) ? intval($aset['linktype']) : 1;
    $aset['dot'] = isset($aset['dot']) ? $aset['dot'] : '';
    if ($aset['linktype'] == "1") {
        $wheresql = " WHERE link_logo='' ";
    } else {
        $wheresql = " WHERE link_logo<>'' ";
    }
    $wheresql .= " AND display=1 ";
    if (intval($_CFG['subsite_id']) > 0) {
        $wheresql .= " AND subsite_id=" . intval($_CFG['subsite_id']) . " ";
    }
    if ($aset['alias']) {
        $wheresql .= " AND alias='" . $aset['alias'] . "' ";
    }
    $limit = " LIMIT " . intval($aset['start']) . ',' . intval($aset['row']);
    $result = $db->query("SELECT link_url,link_name,link_logo FROM " . table('link') . " " . $wheresql . " ORDER BY show_order DESC " . $limit);
    $list = array();
    while ($row = $db->fetch_array($result)) {
        $row['title_'] = $row['link_name'];
        $row['title'] = cut_str($row['link_name'], $aset['len'], 0, $aset['dot']);
        $list[] = $row;
    }
    unset($arr, $str, $a, $params);
    $smarty->assign($aset['listname'], $list);
}
Esempio n. 10
0
 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);
 }
Esempio n. 11
0
function outlogin($skin_dir = "basic")
{
    global $config, $member, $g4, $urlencode, $is_admin;
    $nick = cut_str($member['mb_nick'], $config['cf_cut_name']);
    $point = number_format($member['mb_point']);
    $outlogin_skin_path = "{$g4['path']}/skin/outlogin/{$skin_dir}";
    // 읽지 않은 쪽지가 있다면
    if ($member['mb_id']) {
        $sql = " select count(*) as cnt from {$g4['memo_table']} where me_recv_mb_id = '{$member['mb_id']}' and me_read_datetime = '0000-00-00 00:00:00' ";
        $row = sql_fetch($sql);
        $memo_not_read = $row['cnt'];
        $is_auth = false;
        $sql = " select count(*) as cnt from {$g4['auth_table']} where mb_id = '{$member['mb_id']}' ";
        $row = sql_fetch($sql);
        if ($row['cnt']) {
            $is_auth = true;
        }
    }
    ob_start();
    if ($member['mb_id']) {
        include_once "{$outlogin_skin_path}/outlogin.skin.2.php";
    } else {
        // 로그인 전이라면
        include_once "{$outlogin_skin_path}/outlogin.skin.1.php";
    }
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
Esempio n. 12
0
 function Main()
 {
     $uid = MEMBER_ID;
     if ($uid < 1) {
         $this->Messager("请先<a href='index.php?mod=login'>点此登录</a>或者<a href='index.php?mod=member'>点此注册</a>一个帐号", 'index.php?mod=login');
     }
     $member = jsg_member_info($uid);
     $sql = "select * from `" . TABLE_PREFIX . "blacklist` where `uid` = '" . MEMBER_ID . "' ";
     $query = $this->DatabaseHandler->Query($sql);
     $uids = array();
     while (false != ($row = $query->GetRow())) {
         $uids[$row['touid']] = $row['touid'];
     }
     if ($uids) {
         $where = "where `uid` in (" . jimplode($uids) . ")";
         $member_list = $this->_MemberList($where);
         if ($uids && MEMBER_ID > 0) {
             $sql = "select `uid`,`tid`,`content`,`dateline` from `" . TABLE_PREFIX . "topic` where `uid` in (" . jimplode($uids) . ") group by `uid` order by `dateline` desc";
             $query = $this->DatabaseHandler->Query($sql);
             $topic_list = array();
             while (false != ($row = $query->GetRow())) {
                 $row['content'] = cut_str($row['content'], 100);
                 $row['dateline'] = my_date_format2($row['dateline']);
                 $topic_list[] = $row;
             }
         }
     }
     $group_list = jlogic('buddy_follow_group')->get_my_group(MEMBER_ID);
     $this->Title = '黑名单';
     include template('social/blacklist');
 }
Esempio n. 13
0
    private function INITParameter_all($payment, $parameter)
    {
								$this->api()->hd('request')->setParameter("partner", $payment['config']['bargainor']);
		$this->api()->hd('request')->setParameter("out_trade_no", $parameter['sign']);
		$this->api()->hd('request')->setParameter("total_fee", $parameter['price'] * 100);
		$this->api()->hd('request')->setParameter("return_url", $parameter['notify_url']);
		$this->api()->hd('request')->setParameter("notify_url", $parameter['notify_url']);
		$this->api()->hd('request')->setParameter("body", cut_str($parameter['detail'], 88));
		$this->api()->hd('request')->setParameter("bank_type", 'DEFAULT');
				$this->api()->hd('request')->setParameter("spbill_create_ip", $_SERVER['REMOTE_ADDR']);
		$this->api()->hd('request')->setParameter("fee_type", "1");
		$this->api()->hd('request')->setParameter("subject", $parameter['name']);
				$this->api()->hd('request')->setParameter("sign_type", "MD5");
		$this->api()->hd('request')->setParameter("service_version", "1.0");
		$this->api()->hd('request')->setParameter("input_charset", ini('settings.charset'));
		$this->api()->hd('request')->setParameter("sign_key_index", "1");
				$this->api()->hd('request')->setParameter("attach", "");
		$this->api()->hd('request')->setParameter("product_fee", "");
		$this->api()->hd('request')->setParameter("transport_fee", "0");
		$this->api()->hd('request')->setParameter("time_start", date("YmdHis"));
		$this->api()->hd('request')->setParameter("time_expire", "");
		$this->api()->hd('request')->setParameter("buyer_id", "");
		$this->api()->hd('request')->setParameter("goods_tag", "");
		$this->api()->hd('request')->setParameter("transport_desc","");
		$this->api()->hd('request')->setParameter("trans_type","1");
		$this->api()->hd('request')->setParameter("agentid","");
		$this->api()->hd('request')->setParameter("agent_type","");
		$this->api()->hd('request')->setParameter("seller_id","");
				if ($payment['config']['service'] == 'direct')
		{
			 $this->api()->hd('request')->setParameter("trade_mode", 1); 		}
		if ($payment['config']['service'] == 'medi')
		{
			 $this->api()->hd('request')->setParameter("trade_mode", 2); 		}
    }
Esempio n. 14
0
 private function DownloadFree($link)
 {
     $post = array();
     $post['op'] = "download2";
     $post['id'] = $_POST['id'];
     $post['rand'] = $_POST['rand'];
     $post['referer'] = urldecode($_POST['referer']);
     $post['method_free'] = "Free Download";
     $post['method_premium'] = "";
     $post['code'] = $_POST['captcha'];
     $post['down_script'] = "1";
     $link = $_POST['link'];
     $page = $this->GetPage($link, 0, $post, $link);
     if (strpos($page, "Wrong captcha")) {
         return $this->Retrieve($link);
     }
     if (!stristr($page, "Location:")) {
         html_error("Sorry, download link couldn't be found. Contact the author n give the link which u have this error!");
     }
     $dlink = trim(cut_str($page, "Location: ", "\n"));
     $Url = parse_url($dlink);
     $FileName = basename($Url['path']);
     $this->RedirectDownload($dlink, $FileName, 0, 0, $link);
     exit;
 }
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', esc_attr($instance['title']));
        $limit = strip_tags($instance['limit']);
        $email = strip_tags($instance['email']);
        echo $before_widget . $before_title . $title . $after_title;
        ?>
 
         <ul>
						<?php 
        global $wpdb;
        $limit_num = $limit;
        $my_email = "'" . $email . "'";
        $rc_comms = $wpdb->get_results("SELECT ID, post_title, comment_ID, comment_author,comment_author_email,comment_date,comment_content FROM {$wpdb->comments} LEFT OUTER JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID  = {$wpdb->posts}.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' AND comment_author_email != {$my_email} ORDER BY comment_date_gmt DESC LIMIT {$limit_num} ");
        $rc_comments = '';
        foreach ($rc_comms as $rc_comm) {
            $rc_comments .= "<li>" . $rc_comm->comment_author . ":&nbsp;<a href='" . get_permalink($rc_comm->ID) . "#comment-" . $rc_comm->comment_ID . "' title='在 " . $rc_comm->post_title . " 发表的评论'>" . cut_str(strip_tags($rc_comm->comment_content), 20) . "</a></li>\n";
        }
        echo $rc_comments;
        ?>
		</ul>		
		 
<?php 
        echo $after_widget;
    }
 public function Download($link)
 {
     $page = $this->GetPage($link, 'lang=english');
     is_present($page, "The file you were looking for could not be found");
     $page2 = cut_str($page, '<Form method="POST" action=\'\'>', '</Form>');
     //Cutting page
     $post = array();
     $post['op'] = cut_str($page2, 'name="op" value="', '"');
     $post['usr_login'] = '';
     $post['id'] = cut_str($page2, 'name="id" value="', '"');
     $post['fname'] = cut_str($page2, 'name="fname" value="', '"');
     $post['referer'] = '';
     $post['method_free'] = 'Slow+Download';
     $page = $this->GetPage($link, 'lang=english', $post);
     $page2 = cut_str($page, '<form name="F1" method="POST"', '</form>');
     //Cutting page
     $post = array();
     $post['op'] = cut_str($page2, 'name="op" value="', '"');
     $post['id'] = cut_str($page2, 'name="id" value="', '"');
     $post['rand'] = cut_str($page2, 'name="rand" value="', '"');
     $post['referer'] = urlencode(cut_str($page2, 'name="referer" value="', '"'));
     $post['method_free'] = 'Slow+Download';
     $post['down_direct'] = 1;
     if (!preg_match('@var\\s+cdnum\\s*=\\s*(\\d+);@i', $page, $count)) {
         html_error("Timer not found.");
     }
     $this->CountDown($count[1]);
     $page = $this->GetPage($link, 'lang=english', $post);
     if (!preg_match('@href="(http://[^/|\\"]+/d/[^\\"]+)"@i', $page, $dlink)) {
         html_error('Error: Download link not found.', 0);
     }
     $url = parse_url($dlink[1]);
     $FileName = basename($url["path"]);
     $this->RedirectDownload($dlink[1], $FileName);
 }
Esempio n. 17
0
function tpl_function_qishi_help_show($params, &$smarty)
{
    global $db;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "ID":
                $aset['id'] = $a[1];
                break;
            case "ÁбíÃû":
                $aset['listname'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $sql = "select id,type_id,parentid,title,content,click,addtime from " . table('help') . " WHERE  id=" . intval($aset['id']) . " LIMIT   1";
    $val = $db->getone($sql);
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    }
    $val['keywords'] = $val['title'];
    $val['description'] = cut_str(strip_tags($val['content']), 60, 0, "");
    $val['content'] = htmlspecialchars_decode($val['content'], ENT_QUOTES);
    $smarty->assign($aset['listname'], $val);
}
Esempio n. 18
0
 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;
         }
     }
 }
Esempio n. 19
0
function tpl_function_qishi_simple_show($params, &$smarty)
{
    global $db;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "ID":
                $aset['id'] = $a[1];
                break;
            case "ÁбíÃû":
                $aset['listname'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    unset($arr, $str, $a, $params);
    $sql = "select * from " . table('simple') . " WHERE  id='{$aset['id']}' AND audit=1  LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    }
    $val['keywords'] = "{$val['jobname']} {$val['comname']} ";
    $val['description'] = cut_str(strip_tags($val['detailed']), 60, 0, "");
    $smarty->assign($aset['listname'], $val);
}
Esempio n. 20
0
 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;
 }
 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;
 }
Esempio n. 22
0
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;
}
Esempio n. 23
0
function edit_site()
{
    global $smarty, $lang;
    $site_title = post('site_title');
    $site_name = post('site_name');
    $site_domain = post('site_domain');
    $site_record = post('site_record');
    $site_record_url = post('site_record_url');
    $site_tech = post('site_tech');
    $site_tech_url = post('site_tech_url');
    $site_keywords = post('site_keywords');
    $site_description = cut_str(post('site_description'), 250);
    $statistical_code = post('statistical_code', 'loose');
    $share_code = post('share_code', 'loose');
    $obj = new varia();
    $obj->edit_var_value('site_title', $site_title);
    $obj->edit_var_value('site_name', $site_name);
    $obj->edit_var_value('site_domain', $site_domain);
    $obj->edit_var_value('site_record', $site_record);
    $obj->edit_var_value('site_record_url', $site_record_url);
    $obj->edit_var_value('site_tech', $site_tech);
    $obj->edit_var_value('site_tech_url', $site_tech_url);
    $obj->edit_var_value('site_keywords', $site_keywords);
    $obj->edit_var_value('site_description', $site_description);
    $obj->edit_var_value('statistical_code', $statistical_code, true);
    $obj->edit_var_value('share_code', $share_code, true);
    $smarty->assign('info_text', '修改网站设置成功');
    $smarty->assign('link_text', '返回上一页');
    $smarty->assign('link_href', url(array('channel' => 'basic', 'mod' => 'site_set')));
}
Esempio n. 24
0
 function send_pushwing($pdata)
 {
     $config = array('server' => strip_tags(isset($this->addon_info->server) && $this->addon_info->server ? $this->addon_info->server : 'www.pushwing.com'), 'user' => strip_tags(isset($this->addon_info->pushwing_id) && $this->addon_info->pushwing_id ? $this->addon_info->pushwing_id : ''), 'password' => strip_tags(isset($this->addon_info->pushwing_pw) && $this->addon_info->pushwing_pw ? $this->addon_info->pushwing_pw : ''), 'mno' => isset($this->addon_info->pushwing_mno) && $this->addon_info->pushwing_mno ? $this->addon_info->pushwing_mno : '', 'client_id' => addslashes(strip_tags(isset($this->addon_info->client_id) && $this->addon_info->client_id ? $this->addon_info->client_id : '')));
     $con = mysql_connect($config['server'], $config['user'], $config['password']);
     if ($con) {
         mysql_select_db("pushwing", $con);
         mysql_query('set names utf8');
         $subject_msg = addslashes(cut_str(strip_tags('[' . $pdata['board_name'] . '] 게시물 등록'), 20, '...'));
         $content_msg = addslashes(cut_str('제목 : ' . strip_tags(!empty($pdata['data']->title) ? $pdata['data']->title : 'Untitled'), 20, '...') . PHP_EOL);
         $content_msg .= addslashes(cut_str(strip_tags(!empty($pdata['data']->content) ? $pdata['data']->content : ''), 160, '...'));
         $oMemberModel =& getModel('member');
         $oMyInfo = $oMemberModel->getLoggedInfo();
         if (isset($this->addon_info->pushwing_mnocol) && $this->addon_info->pushwing_mnocol != '' && isset($oMyInfo->{$this->addon_info->pushwing_mnocol}) && $oMyInfo->{$this->addon_info->pushwing_mnocol}) {
             $mno = $oMyInfo->{$this->addon_info->pushwing_mnocol};
             $my_number = is_array($mno) && !empty($mno) ? implode('', $mno) : $mno;
         } else {
             $my_number = NULL;
         }
         $hplist = strstr($config['mno'], ',') ? explode(',', $config['mno']) : array($config['mno']);
         foreach ($hplist as $hp) {
             $hp = preg_replace('/[^0-9]*/s', '', $hp);
             if ($hp && $hp != $my_number) {
                 $idata = array('hp' => $hp, 'client_id' => $config['client_id'], 'subject' => $subject_msg, 'contents' => $content_msg, 'url' => 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . '?mid=' . $pdata['data']->mid . '&document_srl=' . $pdata['document_srl']);
                 $columns = '';
                 $values = '';
                 foreach ($idata as $column => $value) {
                     $columns .= $column . ', ';
                     $values .= "'" . $value . "', ";
                 }
                 mysql_query(sprintf('INSERT INTO push_wait (%s timestamp, ymd, time) VALUES (%s UNIX_TIMESTAMP(), CURDATE() + 0, CURTIME() + 0)', $columns, $values));
             }
         }
         mysql_close($con);
     }
 }
Esempio n. 25
0
 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;
 }
Esempio n. 26
0
 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;
 }
Esempio n. 27
0
 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;
 }
Esempio n. 28
0
 private function Retrieve($link)
 {
     global $options;
     $page = $this->GetPage($link);
     is_present($page, "Link was removed due to violation of our TOS", "Link is not invalid");
     $Cookies = GetCookies($page);
     $random_num = cut_str($page, 'id="random_num" value="', '"');
     $passport_num = cut_str($page, 'id="passport_num" value="', '"');
     preg_match('#http://[a-z]{7}\\d+.megashares.com/[^"]+#', $page, $dlink);
     $img = "http://d01.megashares.com/index.php?secgfx=gfx&random_num={$random_num}";
     $page = $this->GetPage($img, $Cookies, 0, $link);
     $headerend = strpos($page, "\r\n\r\n");
     $pass_img = substr($page, $headerend + 4);
     if (preg_match("#\\w{4}\r\n#", $pass_img)) {
         $t = strpos($pass_img, "P");
         $pass_img = ltrim(substr($pass_img, $t - 2), "\r\n");
     }
     write_file($options['download_dir'] . "megashares_captcha.png", $pass_img);
     $data = array();
     $data['step'] = "1";
     $data['Cookies'] = $Cookies;
     $data['link'] = $link;
     $data['random_num'] = $random_num;
     $data['passport_num'] = $passport_num;
     $data['dlink'] = $dlink[0];
     $this->EnterCaptcha($options['download_dir'] . "megashares_captcha.png", $data, "7");
     exit;
 }
Esempio n. 29
0
 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;
     }
 }
Esempio n. 30
0
 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);
 }