IP Ban for website

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! randy1234 is offline
    MemberRank
    Mar 2009 Join Date
    SingaporeLocation
    1,196Posts

    IP Ban for website

    hey can you guys give me a script for IP Ban in PHP No need Deteabse tables.

    and yes i know it can be bypass with a proxy


  2. #2
    Enthusiast Ryan.b is offline
    MemberRank
    Sep 2007 Join Date
    38Posts

    Re: IP Ban for website

    [delete my reply omg]
    Last edited by Ryan.b; 04-04-10 at 05:07 PM.

  3. #3
    Account Upgraded | Title Enabled! Trilest is offline
    MemberRank
    Apr 2009 Join Date
    The NetherlandsLocation
    549Posts

    Re: IP Ban for website

    Quote Originally Posted by randy1234 View Post
    hey can you guys give me a script for IP Ban in PHP No need Deteabse tables.

    and yes i know it can be bypass with a proxy
    PHP Code:
    $ip $_SERVER['REMOTE_ADDR'];
    if (
    $ip == '127.0.0.1') { echo 'you are banned !'; exit; } 

  4. #4
    Account Upgraded | Title Enabled! sayuta is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    205Posts

    Re: IP Ban for website

    PHP Code:
    <?php
    $idunwantyou 
    = array('127.0.0.1','87.209.160.22'); // Seperate with ,
    $ip $_SERVER['REMOTE_ADDR'];
    if(
    in_array($ip,$idunwantyou)){
    die(
    'Ip banned');
    }
    ?>



Advertisement