Jump to content

[SOLVED] register question


chris_rulez001

Recommended Posts

You have this code in the code library of php freaks:

 

Description:

 

Simply add this to any page that you wish that you want to block that ip address from. It will echo "Site Down" to the user who's ip address is banned. This comes in helpful if you want to trick the user into thinking the site is up, but just down. Simply put <?php include 'banned.php';?> (or the name of what name your file would be in any page that you wish to block that ip. Enjoy

 

<?

$blockip = array("192.169.1.1");

$x = count($blockip);

for ($y = 0; $y < $x; $y++) {

if ($REMOTE_ADDR == $blockip[$y]) {

echo ("Site Down");

Exit;}

}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.