本例以整合home为例 home的登录系统中加入的防伪码主要是三个:
define('IN_UCHOME','asdfasdf'); // 加载dzhome的基本配置文件 include .'/home/data/data_config.php'; // 生成防伪 $action_login = md5('login'.md5($_SCONFIG['sitekey'])); $action_register = md5('register'.md5($_SCONFIG['sitekey'])); $action_formhash = substr(md5(substr(time(), 0, -7).'0'.md5($_SCONFIG['sitekey']).''.$hashadd), 8, 8); echo ' <script> <br/> var loginNum = "',($action_login = md5('login'.md5($_SCONFIG['sitekey']))),'";<br/> var registerNum = "',($action_register = md5('register'.md5($_SCONFIG['sitekey']))),'";<br/> var formhashNum = "',($action_formhash = substr(md5(substr(time(), 0, -7).'0'.md5($_SCONFIG['sitekey']).''.$hashadd), 8, 8)),'"<br/> </script> |