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 15 of 15
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatic IP save + encryption

    I want to be able to IP ban people from my site if they make a fuss, so is it possible for me, when they sign up using a login script, to save their IP along with their username and store it in the database using crypt() ? Are there any tutorials on how to do this?
    Thanks
    -Mike

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    PHP Code:
    <?
    echo $_SERVER['REMOTE_ADDR'] ;
    ?>
    will give the IP address of the user , blocking IP's can have issues in that you can end up blocking a whole heap of users who never did a thing wrong

    perhaps set a 'banned' cookie on the offenders computer when they next login and check for that whenever someone logs in.

    that wont stop users without cookies of course but perhaps try that before the IP thing , `most` surfers wont realise what happened unless they are technically inclined.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    banning by IP isnt a good idea. because alot of people have dynamic IPs someone with the same ISP might get assigned that IP and they wron't understand why they are banned. cookies sounds good,, but the best is to have closed user system so that if the person really wants to annoy you hes going t have to create a new user etc etc.
    photoshop too expensive? use the GIMP! www.gimp.org

  • #4
    Regular Coder dniwebdesign's Avatar
    Join Date
    Dec 2003
    Location
    Carrot River, Saskatchewan
    Posts
    845
    Thanks
    15
    Thanked 10 Times in 10 Posts
    When the user signs up have him enter his e-mail, a username, and full name.
    Set it so a user can only have one username per e-mail

    Have a term that users are only allowed 1 account or be banned.

    Have another term that they have to supply their real name or be banned.

    Then if the user annoys you, you can ban his e-mail, and username. The user, if using the same e-mail, won't be able to re-join. If the user uses a different e-mail and still uses his full name you can see and remove him. I do that with a set of my forums and seems to work well.
    Dawson Irvine
    CEO - DNI Web Design
    http://www.dniwebdesign.com

  • #5
    New Coder
    Join Date
    Jun 2002
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Another possible solution is to have an attitude adjustment set. What I have done is put a colum in my authentication db and if they irritate me or do somethign they aren't supposed to that flag gets checked (Usually automatically). As soon as that column has a value in it no matter where they go on my site they get either never ending browser crashing pop-ups, or annoying messages instead of the content they are looking for, and things like that. There is always an alert box that lets them know they have irritated the god (me) of the site and must send an email of apology and an explanation of their actions for me to remove the flag from the db .

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    damn socraties, thats harsh. you know of this trick?

    WARNING DO NOT CLICK IF YOU HAVE UNSAVED DOCUMENTS! THIS LINK WILL CRASH YOUR COMPUTER!(windowpe anwyays )

    here
    Last edited by whackaxe; 01-02-2004 at 10:43 PM.
    photoshop too expensive? use the GIMP! www.gimp.org

  • #7
    New Coder
    Join Date
    Jun 2002
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hahah yes I do. If people annoy me especially when it is about something stupid or not any problem of mine (especially when they are using a browser that I don't support) they deserve what I dish out to them

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    whackaxe no fair, that link is not opera compatiable.

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #9
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    WARNING DO NOT CLICK IF YOU HAVE UNSAVED DOCUMENTS! THIS LINK WILL CRASH YOUR COMPUTER!(windowpe anwyays )

    here [/B]
    It doesn't work. My computer didn't crash. I tryed everything.

  • #10
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Think that only worked in IE5 and below, not sure though

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nah, works IE6. tried it.
    photoshop too expensive? use the GIMP! www.gimp.org

  • #12
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    It doesn't. I also have IE6.

  • #13
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it's OS independant then. i'm running win 98. well if you got time to spare have a bash
    photoshop too expensive? use the GIMP! www.gimp.org

  • #14
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    It doesn't work in IE 6 or firebird on win xp pro 2166... I know there used to be another one of those, it caused an inescapable BSOD.
    Omnis mico antequam dominus Spookster!

  • #15
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm quite a fan of the ol' <input type>. Shame it's fixed now...
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!


  •  

    Posting Permissions

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