what kind of scripts do you guys use to geotarget your YPN ads? I found one that works if you only have one ad on your page but when i try to ad a second one i get an error. Here is my code..
how could i make this so i can place more then one ad on a page? thanks
Code:
<?
// This part gets the ip of the visitor and matches it to a country name/code
include("geoip.inc");
$gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);
$visitor_country_code=geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
$visitor_country_name=geoip_country_name_by_addr($gi, $_SERVER['REMOTE_ADDR']);
//This part shows banners/codes that YOU decide for each country
switch ($visitor_country_name) {
case "United States": { ?>
YAHOO ADS!!!!!!
<? }
//break;
//case "United States": { ?>
<? //}
break;
// AND SO ON, YOU CAN ADD MORE COUNTRIES HERE JUST LIKE ABOVE
default: { // THIS WILL EXECUTE FOR ALL OTHER DESTINATIONS NOT MENTIONED ABOVE ?>
GOOGLE ADS!!!!!!!!
<? }
}
?>
how could i make this so i can place more then one ad on a page? thanks