Page is a not externally linkable
- Hardware and OS Related Technologies
-- Website Technology Issues
---- How to block a country from accessing my website?


londrum - 8:53 am on Oct 11, 2007 (gmt 0)


the usual way is to put them all into a database, and then check them against each user when they visit. but if you just want some easy PHP at the top of your pages then something like this should do it...


$deny=array(
"111.111.111",
"222.222.222",
"333.333.333"
);

if(in_array($_SERVER['REMOTE_ADDR'],$deny)){exit;}


Thread source:: http://www.webmasterworld.com/website_technology/3474186.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com