php sleep() or record number of failed login attempts?
<p>Aim is to prevent (as much as possible) brute force attacks.</p>

<p>One solution php sleep(), but read that it uses much of server resources (for example, here <a href="http://bytes.com/topic/php/answers/745681-how-does-sleep-work" rel="nofollow">http://bytes.com/topic/php/answers/745681-how-does-sleep-work</a>). </p>

<p>Other solution, record number of logins in mysql, after 2nd or 3rd failed login, echo and validate captcha, after 5-6 failed logins set some timelimit (how to do without sleep())... etc. Question is: does such method will use less system resources?</p>

<p>Please advice on some good method to prevent brute force atacks...
may be after certain number of failed login attempts to redirect somewhere, or to display some different content....?</p>
