Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

creating txt files with javascript.


ghost's Avatar
0 0

Is there any way you can have a login form, that, when you enter your username and password it creates a .txt file with the User + pass in it.

if this isnt possible i probably look real stupid right now.


ghost's Avatar
0 0

You can do it with PHP, or any other server-side scripting language, but nit JavaScript.


ghost's Avatar
0 0

yes in php is this really easy, i give you simple example, this script logs ip of a visitor, time of the visit and writing this to file "ip.txt" if this file does not exist, php script create him. here is the code:

$file = fopen ("ip.txt", "a+");
$string = date("d.m.Y H:i"); // 07.03.2007
$string .= ' '.$REMOTE_ADDR;
$string .= ' '.gethostbyaddr($REMOTE_ADDR);
fwrite ($file, "$string\n");
fclose($file);
?>```
this is just example, there are many options, you can create a form and a php script etc. etc. if you need more help just ask and i´ll try to help you if i will know ;)
[EDIT] I think i was wrote an article right for this, it is php script that send usernames and passwords to the e-mail but there is no problem to modify this to file-writing, article is here:
http://hellboundhackers.org/articles/626-Phishing---Email-passwords-via-PHP.html
[/EDIT]