Banning IP's from sites...

Discussion in 'Web Design & Programming' started by Waffle, Jan 9, 2005.

  1. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    I need to ban a certain person from accessing the bands site, due to her stalker like behaviour among other things.

    I'm guessing I need her IP to do it, then its somethin in notepad saved as something else.

    How do I get an IP?

    And if its on 56k as the ip changes each time, is there a way to get around this?

    Thanks.
     
  2. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    if they have are on 56k then there is no way to block it as the ip changes all the time.

    In PHP to get the ipaddress you can use
    PHP:
    $ipaddress =  $_SERVER['REMOTE_ADDR'];
     
  3. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    If the server is running a *nix varient and you have r/w access to the /etc/hosts.deny file, you could add her IP address to that. If she's on a small ma & pa ISP, you could even add her whole IP block to your deny list.
     
  4. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    Right, as far as I know, the server isn't of a *nix varient.

    And she's on 56k, which is why I suspected it wouldn't be possible.

    Thanks for the info.
     
  5. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    Dial up users just get any free IP address from a pool at the ISP. Maybe you can tell her to stop or get broadband?
     
  6. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    lol "get broadband so I can ban you, biatch".

    Unlikely, but its worth a shot. :D
     

Share This Page