Welcome Guest, Not a member yet? Register   Sign In
How to set time in Global redirect session
#1

How to set out those minutes in this way?

PHP Code:
return redirect()->to('login')->with('blockHacker''You requested too many times Try again after 40 minutes'); 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#2

the way I approaches it was not to time them but t oset a limit of login attempts like this in the login contoller :

Code:
else
        {
                
               $logic =isset(   $_SESSION['count']);
               if ($logic ==false)
               {
                $_SESSION['count']=5;  
                return redirect()->route('loginRoute');
                
                
                
                }  
                  
                elseif($logic==true)
                
                {
                if(    $_SESSION['count']<=1 )
                {
                    
                    return redirect()->to('http://www.google.com');
                    
               }        
                    
                else
                
                {
                              
                                       $oldCount=  $_SESSION['count'];
                                        $newCount = $oldCount-1;
                                        $_SESSION['count']= $newCount;

basically in each attempt and failure of login , count goes down by one .
CMS CI4     I use Arch Linux by the way 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB