...

View Full Version : ip blocking



eric float
12-02-2008, 03:49 PM
hi ,
i have a form for register user . data save in mysql database:
1 - name
2 - last name
3 - tel
4 - . . . .
. .
8 - IP
9 - time ( timestamp )

now for security ! each IP only one register in system each 60 min . for two place send error : you are register in system with this IP ! for register again please wait 60min ( or any time ) . how to ?? thanks regards .

eak
12-02-2008, 04:36 PM
I would have 2 tables. The first is your users table with username, password, etc.
The second would be an "Active Users" table. This would only contain info about users that are currently logged into the system. You would keep the IP in this table.
You could even have a unique constraint on it so that you cannot have 2 users from the same IP. If you try to insert a duplicate IP, the query would fail and you could easily check that.

How do your users timeout? Do you have a cron job that auto logs out your users?

eric float
12-02-2008, 07:36 PM
The second would be an "Active Users" table. This would only contain info about users that are currently logged into the system. You would keep the IP in this table. !!
cron job ?? lol . user not login in system . this any idea for flood protect . Example : user send data for IP ! request database & table if ip was in table send error . ok ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum