Jump to content

[SOLVED] Temporary IP banning


exoban

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.