I am currently working on a project for tech (university). It's a login form that uses a CAPTCHA as validation and must monitor the IP address of the computer that has currently requested the form. The IP monitoring part is so that if a user has made x (let's say 5) wrong attempts, they must be blocked temporarily.
The captcha works (few glitches here and there), the IP tracker works too. What I've thought to do is to store the IP addresses in a database along with a primary key to identify each address, then use that primary key in a counter e.g when an ip address with the id of 2 has made its attempts, block it based on its primary key.
At the moment, I would like a few pointers on the counter. Been playing around with it. I'm willing to show what it's currently looking like