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;}

}

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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