Blocking adsense ad units for a particular country [closed]

A quick google search gave me this.
This plugin seems to have this feature:
http://wordpress.org/extend/plugins/ad-injection/faq/

How can I show different ads to people in different countries?

If you install the Country Filter plugin (with the IP database) then you can use the following code in the direct ad insertion modes. This will not work in mfunc mode!

<?php if (function_exists('isCountryInFilter')) { ?>
<?php if(isCountryInFilter(array("uk"))) { ?>

UK advert

<?php } else { ?>

Global advert

<?php } } ?>

— since above is a paying option. what you can do is .

use remote_addr to get your visitors ip

$ip = $_SERVER['REMOTE_ADDR'];

next use a networkservice that can provide you this information, or you can make functions for that yourself using available databases.

— your easiest solution would be to use geolocation, but then your users have to agree with this.