While that method does work I would actually go another route and use a geo target on the client itself. Checking both the browser language and client IP. People can still use proxies using the method above, where has going the next step and verifying languages and countries will make it that much more difficult to do.
This works but can bog your server if you alot CIDR lines in it. Plus also the will see, FORBIDDEN If you want make it like you don't exist, not even respond to any pings use iptables if you have a root access. You can read how to do this here, block with Iptables
OK, this is what I use. It's loads faster and less boggy than using a long lists of IPs to load for every page. .htaccess <Limit GET POST> order allow,deny allow from all deny from ip address deny from .cn deny from .id deny from .ng deny from .zw deny from .gh </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> PHP: If the referring IP resolves to any of the above country extension, the user is blocked: 403 Forbidden granted, it can be bypassed and it's not fool-proof, but it does do a reasonable job for what resources it uses