title: How to delay login attempts after too many tries (PHP)
body: <p>I'm working on a fairly large web site built in PHP that will potentially have a lot of users. I'm looking into a way to protect the login screen from automated attempts. I have already included a CAPTCHA check on the registration form, yet want to harden the site more.</p>
  
  <p>There have been similar questions on StackOverflow that I know of, and I know I'm capable of implementing this myself from scratch (storing login attempts and their time in the db), yet I dislike that path:</p>
  
  <ul>
  <li>Conceptually, I think this kind of logic belongs at the web server/infrastructure level, not the application level. I dislike having this logic and complexity in my application</li>
  <li>I worry about performance, particularly at the database level.</li>
  <li>I'm lazy, in a good way, by not wanting to build a common utility like this from scratch</li>
  </ul>
  
  <p>Any advise is appreciated, I think that I'm particularly looking for some kind of Apache module that can do this. My platform is PHP5 (using CodeIgniter), Apache2, MySQL 5.</p>