Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-02-2008, 02:49 PM   PM User | #1
eric float
New Coder

 
Join Date: Dec 2007
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
eric float is an unknown quantity at this point
ip blocking

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 .
eric float is offline   Reply With Quote
Old 12-02-2008, 03:36 PM   PM User | #2
eak
Regular Coder

 
eak's Avatar
 
Join Date: Jun 2002
Location: Nashville, TN
Posts: 354
Thanks: 0
Thanked 26 Times in 26 Posts
eak is on a distinguished road
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?
__________________
eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."
eak is offline   Reply With Quote
Old 12-02-2008, 06:36 PM   PM User | #3
eric float
New Coder

 
Join Date: Dec 2007
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
eric float is an unknown quantity at this point
Quote:
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 ?
eric float is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:53 AM.


Advertisement
Log in to turn off these ads.