Hi all
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

Recommended Answers

All 2 Replies

Okay in this case since the server treats each incoming request as a new request,storing the ip addresses was a good idea.You can declare a counter field in your table.during each request by the login form you check if the value of the counter field is equal to 5 for that ip address.If it is block registration appropriately for the specified time after which you reset the counter.

Okay in this case since the server treats each incoming request as a new request,storing the ip addresses was a good idea.You can declare a counter field in your table.during each request by the login form you check if the value of the counter field is equal to 5 for that ip address.If it is block registration appropriately for the specified time after which you reset the counter.

I was thinking that the value could be stored to the database (counter field) either during an increment of the counter or after the user ends the session (closes the page)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.