Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: ip blocking

  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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 .

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    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."

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •