君山 发表于 2020-10-26 23:24:19

Discuz aidencode 论坛 aid url 生成

/**
* 论坛 aid url 生成
*/
function aidencode($aid, $type = 0, $tid = 0) {
        global $_G;
        $s = !$type ? $aid.'|'.substr(md5($aid.md5($_G['config']['security']['authkey']).TIMESTAMP.$_G['uid']), 0, 8).'|'.TIMESTAMP.'|'.$_G['uid'].'|'.$tid : $aid.'|'.md5($aid.md5($_G['config']['security']['authkey']).TIMESTAMP).'|'.TIMESTAMP;
        return rawurlencode(base64_encode($s));
}

页: [1]
查看完整版本: Discuz aidencode 论坛 aid url 生成