Hello all, I want to insert a code in my phpBB2.
All them are in a TXT file and taken with an array:
PHP Code:$id = 23;
$pass = pass.txt;
if ($forum_id == $id) {
$error_login = "No permission<br />".
"<form action='login.php' method=POST><input name='pass' type='pass' /><input type=submit value=verify />".
"</form>";
if (!in_array($_COOKIE['pass'], file($pass)) message_die(GENERAL_ERROR, $error_login);
$file = fopen("log.txt", "a+");
$log = $userdata['user']." IP:".$_SERVER['REMOTE_ADDR']." PASS:".$_COOKIE['pass']."\r\n";
fwrite($file, $log);
fclose($file);
}
When an user logins, the password is setted in the cookies and then the ip of the user and the time is stored in the log.txt file.
It works, but this method is secure?!
Thanks in advance.




Reply With Quote