View Single Post
Old 05-04-2006, 04:51 PM  
xlogger
Confirmed User
 
Join Date: Jul 2004
Location: NY
Posts: 9,507
:tongue Ok guys, i found the greatest (free) tool for webmasters!

So, i never really paid attention to the fact that i was sending forign traffic to my sponsor that wasnt converting. All it does it make the stats look bad.So i found a tool that will let you geo-ip your ads on your site. Meaning, lets say one visitor is from the US - he will see a ad for a us sponsor and the other chinese one will see an ad for a dialor or w/e. This is not one of those "look at surfers browser" type of things. This looks at the ip and determins the country. Im not really good at explaining things but i will do my best here! mkkay

Step by step:

1. Download these files:
- GeoIP.dat from http://www.maxmind.com/app/geoip_country (they update the geo every month)
- geoip.inc from http://www.maxmind.com/download/geoip/api/php/
and put them in the folder where your php banner script will be.


2. The php banner script
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 "China": { ?>

<-- WHAT EVER CRAPPY BANNER YOU WANT TO SHOW FOR BELGIUM GOES HERE -->

<? }
    break;
case "Taiwan": { ?>

<-- WHAT EVER CRAPPY BANNER YOU WANT TO SHOW FOR TAIWAN GOES HERE -->

<? }
    break;

// AND SO ON, YOU CAN ADD MORE COUNTRIES HERE JUST LIKE ABOVE

default: { // THIS WILL EXECUTE FOR ALL OTHER DESTINATIONS NOT MENTIONED ABOVE ?>

<-- SEX SEARCH OR TCG BANNER SUITABLE FOR FOR OTHER DESTINATIONS -->

<? }
}
?>
3. Look at my sig and sign up

hehe, not really but you should!
__________________

----------
XLOGGER [REFLECTED] [OH]

Last edited by xlogger; 05-04-2006 at 04:52 PM..
xlogger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote