There have been several times you were told by pay per click companies that Non-US Based traffic wont be paid or will be paid much lower than US based traffic and this is the time you will need a GEOTarget adverts feature or a script on your website which can show ads based on the visitors country and this is called GeoTarget Adverts.
Recently WidgetBucks announced that Non US Publishers not to be paid WidgetBucks and previously chitika and Yahoo publisher network also disapproved Non-US based traffic, which makes me sure you are looking for this kind of script.
Installation :
There are two versions of the script, depending on whether you are more willing to accept false positives or false negatives. This is necessary due to the way different browsers report their language.
1. You will need to create two text files in the home directory of your server, usads.txt and otherads.txt . Paste in ad code you want to show to US visitors(ex. YPN) in usads.txt and paste in ad code you want to show international visitors(ex. AdSense) in otherads.txt .
2. Paste one of the following script versions to the place in your template where you want to insert ads. For US visitors the Safari and Opera browsers report their language only as “en”, while Firefox and Internet Explorer report it as “en-us”. The More Restrictive version of the script will only show US ads to browsers reporting “en-us”- thus, Safari and Opera visitors will only be shown International ads, regardless of location. However, you can be sure that no ads intended for US visitors are shown to international visitors. The Less Restrictive version shows US ads to any browser reporting “en”, so American users of all browsers will be shown ads intended for Americans- but so will anyone else in an English-speaking country, primarily Great Britain and Canada. WordPress won’t let me put php code into posts, so you will need to put < ?php (without the space) at the beginning of the script and ?> (without the space) at the end.
More Restrictive:
$language = $_SERVER[‘HTTP_ACCEPT_LANGUAGE’];
if (substr($language,0,5)==”en-us”){
include “usads.txt”;
}
else {
include “otherads.txt”;
}
Less Restrictive:
$language = $_SERVER[‘HTTP_ACCEPT_LANGUAGE’];
if (substr($language,0,2)==”en”){
include “usads.txt”;
}
else {
include “otherads.txt”;
}
If you are using the WP-Cache plugin, you will need to mark the code as executable by enclosing it in –mfunc tags: put < !–mfunc–>(without the space) at the beginning and < !–/mfunc–>(without the space) at the end.
Because the ad code is included in a separate text file, and seamlessly written into the page upon execution, you are not modifying the actual ad code, and are thus fully compliant with their TOS.
Thanks to Neomeme for providing this excellent script.
Another optional Script if the above one does not work out is here

Thanx for the Tip Amit, will try it out.We might need it for WidgetBuscks.
Venkat’s last blog post..Download ZoneAlarm Anti-Spyware for FREE
thanks it will help a lot