Does anybody know a secure and free log in script that will block the IP after 3 times or block log in for 10 min or something. If it also sends an email to me with the IP would be even better.
You can simply add incorrect login counter ! If login successful - clear this field .. if not - increase it by 1. When you see that there are already 3 warnings - disable login for 15 minutes ! Easy ..
Active Forest do you have sample code of this. I am looking for something to Ban IP or country and also send me an email as well.
<? session_start(); $uid = $_POST['username']; $pwd = $_POST['password']; $incorrect_login = $_SESSION['incorrect']; if($incorrect_login==3) { //user has exceeded max allowed logins. redirect him to index page or wherever header("Location : index.php?you+have+exceeded+max+allowed+logins"); } if($uid=='chandan'&&$pwd=='chandan')//here you can add your database verification or whatever { header("Location : welcome_user.php"); }else { //that means it is an incorrect login attempt $_SESSION['incorrect']=$_SESSION['incorrect']+1; mail("admin@Yellowberry.org","Incorrect Login Attempt","Incorrect Login","From : "); } ?>
now the day blocking IPs become less useful that is one reason why DP uses "enter random code" to verify each new thread post or you can only make 5 mistakes every hour