hello , I am looking for any script allowed to me to block some country user from my site , I will pay for this thanks
I want block the all country users , for Example any IP coming from U.S.A Will not view my site , like that
Ah ok. Well, you would need ranges. If you need something different I can program it to you, I'll just need specifically what you need then I can quote you. However, http://blockacountry.com is free. It's very simple. Select countries you wish to block, put in your email, copy/paste the code they provide into your .htaccess file. Regards, Dennis M.
I test this But its not working , I choice U.S.A and i copy all the Proxy and i past in my .htaccess file and i log in to my server in U.S.A and he open my site , So can you provide me something like this and working ?
Are you on a dedicated server, or shared? If you are on a dedicated server, you can build the Maxmind GeoIP into Apache the use .htaccess to redirect as needed.
Just coded it in the submit box didn't have time to check it should work... might need some tweaking. <? $ip = $_SERVER['REMOTE_ADDR']; $page = file_get_contents("http://api.hostip.info/country.php?ip=".$ip); if(preg_match('/US/',$page)) { header("Location: http://google.com"); exit(); } else { echo "enter site"; } ?> PHP: