function get_esquire_com_cn_formhash() {
$uid = 8
;
$username = 'Imuser'
;
$timestamp =
time();
/* ./config/config_default.php配置中的信息*/
$authkey = 'sdeefffffffffdererererer';
//$_config['security']['authkey']的值
$config['cookie']['cookiepre'] = 'aswe_'
;
$config['cookie']['cookiedomain'] = ''
;
$config['cookie']['cookiepath'] = '/'
;
/**/
$cookiepre =
$config['cookie']['cookiepre'] .
substr(
md5(
$config['cookie']['cookiepath'] . '|' .
$config['cookie']['cookiedomain']), 0, 4) . '_'
;
$cookiesalt =
$_COOKIE[
$cookiepre . 'saltkey'
];
$authkey =
md5(
$authkey .
$cookiesalt);
$formhash =
substr(
md5(
substr(
$timestamp, 0, -7) .
$username .
$uid .
$authkey), 8, 8
);
return $formhash;
}
转载于:https://www.cnblogs.com/bandbandme/p/3196402.html