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..

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..
Because it needs to be like that so all admins of the shoutbox can ban IP's without cpanel access.
PHP Code:[LEFT]<?[/LEFT]
[LEFT]$name = $_GET['name'];[/LEFT]
[LEFT]echo "Hi, your name is $name";[/LEFT]
[LEFT]?>[/LEFT]
[LEFT][/LEFT]
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.
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]
just simply use something like this:
since lets be honest how many people are you really going to need to ip ban "/PHP Code:<?php
$ip = $_SERVER['REMOTE_ADDR'];
$banned = array(
1 => "000.000.000.01",
2 => "000.000.000.02",
3 => "000.000.000.03"
);
$size = sizeof($banned);
for($i=0, $i < $size, $i++) {
if($ip == $banned[$i]) {
echo "Your banned!";
exit();
}
}
?>
Last edited by Splinter; 09-08-2006 at 03:43 PM.
I need an IP Banning system in which you type the IP into a form field.
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?
I only want admins and mods to be able to view ips
Want to hide these adverts? Register an account for free!