<?php
ob_start();
// |L|ogin |B|an
require('lb.class.php');
$LB = new Login_Ban('3', '15');// 3 is the limit attemps & 15 is the ban time (Minutes)
// Checking
if($LB->Banned())
{
die('You have use all attempts');
}
?>
<form method="post" action="?do=Login">
Name : <input type="text" name="username"><br />
<input type="submit" value="Go !!">
</form>
<?php
if($_GET['do'] == 'Login')
{
$Name = 'Mohammed';
if($_POST['username'] != $Name)
{
echo 'Attemp failed';
$LB->Set_Attemp();
} else
{
echo 'Succed !!';
}
}
// if you wan't to delete all cookies Use the function :
/*
$LB->mkempty();
*/
?>
|