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
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can someone give me a good Ban IP script?

    Can someone give me a good ban ip script? Something like you have to put it in the head section of the page and then the people from the ip you filled in can't see the page? Please help me.
    Cheers MPCODER

  • #2
    Regular Coder
    Join Date
    May 2003
    Location
    34 54' N 82 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Banning doesn't always work correctly and you can sometimes ban people you don't mean to ban, but here you go.
    PHP Code:
    <?
    $ip 
    $_SERVER['REMOTE_ADDR'];
    $bannedips = array("IP HERE","IP HERE","IP HERE");
    if (
    in_array($ip$bannedips)) {

       
    // disallow

    } else {

       
    // allow

    }
    ?>
    Last edited by SDP2006; 01-05-2004 at 01:25 PM.
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #3
    New Coder
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks!

    Thank you!


  •  

    Posting Permissions

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