...

View Full Version : Can someone give me a good Ban IP script?



MPCODER
01-05-2004, 02:06 PM
Can someone give me a good ban ip script? Something like you have to put it in the head section of the page and then the people from the ip you filled in can't see the page? Please help me.
Cheers MPCODER

SDP2006
01-05-2004, 02:22 PM
Banning doesn't always work correctly and you can sometimes ban people you don't mean to ban, but here you go.


<?
$ip = $_SERVER['REMOTE_ADDR'];
$bannedips = array("IP HERE","IP HERE","IP HERE");
if (in_array($ip, $bannedips)) {

// disallow

} else {

// allow

}
?>

MPCODER
01-05-2004, 02:33 PM
Thank you!:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum