PDA

View Full Version : I need somone



StokeFM
22-07-2007, 01:50 PM
I have this IP ban script


<?php

//Array of Banned ips
$banned_ips[0] = "000.000.000.001";
$banned_ips[1] = "000.000.000.002";
$banned_ips[2] = "000.000.000.003";
$banned_ips[3] = "000.000.000.004";
$banned_ips[4] = "000.000.000.005";
$banned_ips[5] = "000.000.000.006";

// Loop Threw All the Ips.
for($K = 0; $K<sizeof($banned_ips); $K++)
{
//If an Ip matches the user ip. Stop the page from loading.
if($banned_ips[$K] == $_SERVER['REMOTE_ADDR']){
die("You have been Banned from viewing this Page.");
}
}
?>

Could someone make it so its in a form...And like you input the IP and possibly if u wnna be super kind...Add a ban length script thingy so, you input how long they are banned for

Invent
22-07-2007, 03:06 PM
MySQL or Flatfile?

StokeFM
22-07-2007, 03:29 PM
What is the better option?

StokeFM
23-07-2007, 10:27 AM
*Could not edit*

What is better, Mysql or Flatfile>?

Amilo
23-07-2007, 11:46 AM
Flatfile should be fine for what you're after.

Jamie.
23-07-2007, 08:11 PM
http://www.techtuts.com/forums/index.php?showtopic=3262

Edit it to your needs :)

Want to hide these adverts? Register an account for free!