Home > php教程 > php手册 > body text

整合Discuz用户登陆代码

WBOY
Release: 2016-06-21 08:56:53
Original
1182 people have browsed it

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











Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!