本文整理汇总了PHP中misc::getTbs方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::getTbs方法的具体用法?PHP misc::getTbs怎么用?PHP misc::getTbs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc
的用法示例。
在下文中一共展示了misc::getTbs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cron_wmzz_ban
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']}'");
}
}
}
示例2: DoSign_Client
/**
* 客户端签到
*/
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: Fucking 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);
}