exoban Posted November 19, 2008 Share Posted November 19, 2008 I'm not entirely sure if this would be done with PHP or not. When a user makes 5 failed login attempts, I want to require a CAPTCHA to login every following attempt. After a certain amount of time without any failed attempts, the CAPTCHA is no longer required. A lot of Google's services/websites use this system. For example, Gmail or YouTube How could I do this based on IP addresses? I thought of temporarily storing it in a MySQL database, but more efficient methods might be out there. Thanks to whoever helps out. Link to comment https://forums.phpfreaks.com/topic/133326-solved-temporary-ip-banning/ Share on other sites More sharing options...
trq Posted November 19, 2008 Share Posted November 19, 2008 I thought of temporarily storing it in a MySQL database, but I more efficient methods might be out there. That is indeed probably the easiest approuch. Link to comment https://forums.phpfreaks.com/topic/133326-solved-temporary-ip-banning/#findComment-693387 Share on other sites More sharing options...
exoban Posted November 19, 2008 Author Share Posted November 19, 2008 I thought of temporarily storing it in a MySQL database, but I more efficient methods might be out there. That is indeed probably the easiest approuch. Alright. What's the best way to flush out old IP logs from the database though? I'm thinking of using CRON for a scheduled clean up. Link to comment https://forums.phpfreaks.com/topic/133326-solved-temporary-ip-banning/#findComment-693389 Share on other sites More sharing options...
trq Posted November 19, 2008 Share Posted November 19, 2008 I'm thinking of using CRON for a scheduled clean up. Once again, your thinking allong the right lines. Just store a timestamp with the ip then form a query to remove records older than you wish. Link to comment https://forums.phpfreaks.com/topic/133326-solved-temporary-ip-banning/#findComment-693393 Share on other sites More sharing options...
exoban Posted November 19, 2008 Author Share Posted November 19, 2008 I'm thinking of using CRON for a scheduled clean up. Once again, your thinking allong the right lines. Just store a timestamp with the ip then form a query to remove records older than you wish. Just had to be sure, thanks. Link to comment https://forums.phpfreaks.com/topic/133326-solved-temporary-ip-banning/#findComment-693394 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.