- Joined
- Jan 16, 2007
- Messages
- 133
- Reaction score
- 0
Hello,
I've been getting some annoying people in my web site and I want to block them from viewing my site.
I added the follownig code to my index.php but it din't work, If any one knows please help me out.
<?php
$ip = getenv('REMOTE_ADDR');
$blocked = "xx.xx.xx.xx";
if (ereg($blocked,$ip))
{
echo "You Have Been Banned";
exit();
}
?>
Thanks in advice.
I've been getting some annoying people in my web site and I want to block them from viewing my site.
I added the follownig code to my index.php but it din't work, If any one knows please help me out.
<?php
$ip = getenv('REMOTE_ADDR');
$blocked = "xx.xx.xx.xx";
if (ereg($blocked,$ip))
{
echo "You Have Been Banned";
exit();
}
?>
Thanks in advice.