Home >php教程 >php手册 >整合Discuz用户登陆代码

整合Discuz用户登陆代码

WBOY
WBOYOriginal
2016-06-21 08:56:531217browse

本例以整合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>











Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn