Here is list of country IPs: http://www.ipdeny.com/ipblocks/
You can block the desired ranges through .htaccess.
You can do this adding something like following:
<Limit GET POST HEAD>
Allow from all
deny from 188.8.131.52/15
i have a website i want to stop this website being viewed in a certain country, i know its possible just dunno how to do that how to get the IP range of that country,,,