This tutorial is for PHProxy users (better than glype )
note: this topic has been discussed again and again and again but i still find users having a hard time installing it so here goes my tutorial (works with shared hosting)
2)Create a new folder called "geoip" in your phproxy main folder and paste geoip.inc and geoip.dat w/o cap locks inside the geoip folder.
3)Paste this code in index.inc not index.php (people usually paste it in index.php but that can cause unexpected errors like corrupted images and random bugs)
and create a costume 403 error.
$gi = geoip_open('geoip/geoip.dat',GEOIP_STANDARD);
$addr = getenv('REMOTE_ADDR');
$country = geoip_country_name_by_addr($gi, $addr);
$badcountry = array('Saudi Arabia','China','Iran','Brazil','Hungary','India','United Arab Emirates','Vietnam','Turkey','Pakistan','Israel','Indonesia','Iraq','Egypt');
header('Location: http://YOUR-SITE-GOES-HERE/403.php'); //enter an url or page on your site
And you are done