Beispiel #1
0
function cron_wmzz_ban()
{
    global $m;
    $s = unserialize(option::get('plugin_wmzz_ban'));
    $now = strtotime(date('Y-m-d'));
    $y = $m->query("SELECT * FROM `" . DB_PREFIX . "wmzz_ban` WHERE `nextdo` <= '{$now}' LIMIT {$s['limit']}");
    while ($x = $m->fetch_array($y)) {
        $r = wmzz_ban_getTime($x['date']);
        if ($r != '-1') {
            $bduss = misc::getCookie($x['pid']);
            $c = new wcurl('http://tieba.baidu.com/pmc/blockid');
            $c->addcookie('BDUSS=' . $bduss);
            $c->post(array('user_name[]' => $x['user'], 'day' => $r, 'fid' => misc::getFid($x['tieba']), 'tbs' => misc::getTbs($x['uid'], $bduss), 'ie' => 'utf-8', 'reason' => $s['msg']));
            $next = $now + $r * 86400;
            $m->query("UPDATE `" . DB_PREFIX . "wmzz_ban` SET `nextdo` = '{$next}' WHERE `id` = '{$x['id']}'");
        } else {
            $m->query("DELETE FROM `" . DB_PREFIX . "wmzz_ban` WHERE `id` = '{$x['id']}'");
        }
    }
}
 /**
  * 客户端签到
  */
 public static function DoSign_Client($uid, $kw, $id, $pid, $fid, $ck)
 {
     $ch = new wcurl('http://c.tieba.baidu.com/c/c/forum/sign', array('Content-Type: application/x-www-form-urlencoded', 'User-Agent: F*****g iPhone/1.0 BadApple/99.1'));
     $ch->addcookie("BDUSS=" . $ck);
     $temp = array('BDUSS' => misc::getCookie($pid), '_client_id' => '03-00-DA-59-05-00-72-96-06-00-01-00-04-00-4C-43-01-00-34-F4-02-00-BC-25-09-00-4E-36', '_client_type' => '4', '_client_version' => '1.2.1.17', '_phone_imei' => '540b43b59d21b7a4824e1fd31b08e9a6', 'fid' => $fid, 'kw' => $kw, 'net_type' => '3', 'tbs' => misc::getTbs($uid, $ck));
     $x = '';
     foreach ($temp as $k => $v) {
         $x .= $k . '=' . $v;
     }
     $temp['sign'] = strtoupper(md5($x . 'tiebaclient!!!'));
     return $ch->post($temp);
 }