If you use maxminds geo-ip database don't be cheap and get the premium country service. If you use their free database e.g. AOL is taken as US even if you use AOL Germany or other countries.
I use the apache module and use php to forward certain IP blocks.
$country_code = apache_note("GEOIP_COUNTRY_CODE");
switch($country_code) {
case 'A1':
case 'IN':
case 'PK':
case 'CN':
case 'ID':
case 'MY':
case 'PH':
case 'TH':
case 'IR':
case 'LK':
.
.
.
case 'BA':
case 'EE':
case 'SK':
case 'LT':
case 'LV':
case 'KZ':
case 'TM':
case 'KG':
case 'MK':
case 'RO':
case 'UZ':
case 'AL':
case 'CU':
header('Location:
http://www.yourdomain.com/cgi-bin/forward.pl');
exit();
break;
default:
break;
}
Case is faster than if clauses. It takes all the countries until a break is displayed so you have less code and you can block forward certeain countries. I then use a perl prog to forward the
traffic to different sponsors or toplists or whatever. The advantage is that the perl prog is not called everytime and noone even notices that he is forwarded.