Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default In need of IP Banning Script.

    Ok, i need a simple IP Banning script, in which there is a form on a page, and you can type in IP addresses which then gets written to a file, and you put a php code on every page you want to include the IP ban on.. Thanks..

  2. #2
    Join Date
    Aug 2006
    Posts
    461
    Tokens
    0

    Default

    Why not use Ip Deny thing
    Quote Originally Posted by Drugs View Post
    Ok, i need a simple IP Banning script, in which there is a form on a page, and you can type in IP addresses which then gets written to a file, and you put a php code on every page you want to include the IP ban on.. Thanks..

  3. #3
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Because it needs to be like that so all admins of the shoutbox can ban IP's without cpanel access.

  4. #4
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  5. #5
    Join Date
    Feb 2006
    Location
    Newcastle
    Posts
    397
    Tokens
    0

    Default

    yeah you need cpanel for that though to type in ips.

    i had one for my user system for thehabbos somewhere it tells the user why they are banned and how long in popup.

  6. #6
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    Not if you just do a quick script that adds the IPs into the banned IP array.
    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  7. #7
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    just simply use something like this:
    PHP Code:
    <?php
    $ip 
    $_SERVER['REMOTE_ADDR'];
    $banned = array(
    => "000.000.000.01",
    => "000.000.000.02",
    => "000.000.000.03"
    );

    $size sizeof($banned);

    for(
    $i=0$i $size$i++) {
    if(
    $ip == $banned[$i]) {
    echo 
    "Your banned!";
    exit();
    }
    }
    ?>
    since lets be honest how many people are you really going to need to ip ban "/
    Last edited by Splinter; 09-08-2006 at 03:43 PM.

  8. #8
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    I need an IP Banning system in which you type the IP into a form field.

  9. #9
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Talking of IP's and forms so it is sorta on topic.

    I have a shoutbox that sends a form but i cant remeber how to send the IP with it but they dont know any help?

  10. #10
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    I only want admins and mods to be able to view ips

Posting Permissions

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