Forum Moderators: skibum

Message Too Old, No Replies

Artificial geo targeting for Chitika and Adsense

Anyone know how to write a script for that?

         

spica42

3:20 am on Nov 19, 2005 (gmt 0)

10+ Year Member



Well, Chitika doesn't accept clicks from outside US etc.. Is it possible to write a script so that traffic outside USA will see google ads instead?

Ratbert

4:00 pm on Nov 19, 2005 (gmt 0)

10+ Year Member




function geolocation()
{
include_once('./geoip.inc');
$gi = geoip_open('./GeoIP.dat', GEOIP_STANDARD);
$countrycode = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);
return in_array($countrycode, array('US', 'GB', 'FR', 'CA', 'AU', 'NZ'));
}

Returns true if user is from supported country.

You'll need:
[maxmind.com...]
[maxmind.com...]

tntpower

7:26 am on Nov 20, 2005 (gmt 0)

10+ Year Member



You can simply use PhpAdsNew