...

View Full Version : IP block script



el dude
09-16-2005, 03:12 PM
I'm looking for a simple IP block script that will allow me to block IP ranges and let the blocked people see a page that tells them that they hare banned.

NancyJ
09-16-2005, 03:35 PM
http://www.htmlbasix.com/blockusers.shtml

el dude
09-16-2005, 04:00 PM
I don't want to use .htaccess.

NancyJ
09-16-2005, 04:14 PM
why not?

NancyJ
09-16-2005, 04:16 PM
http://www.radiantfx.com/tutorials/1/34/IP-Banning.php

but you will have to put it on every single page that you want to block, it would be much easier to do with .htaccess

NickCTM
09-16-2005, 04:24 PM
Simply adding a include('IP_Block.php'); won't hurt.

JamieR
09-16-2005, 04:54 PM
Try:



<?php

if ($_SERVER['REMOTE_ADDR'] == '81.132.1.100-81.123.111')
{

header("Location: banned.php");
}else{

header("Location: index.php");
}

exit()

?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum