How To Setup GEO Targeting Redirects Using Cloud Flare

Have you ever purchased paid advertising where the traffic came from a number of different countries but your offer was only available for specific countries. Perhaps you are involved in CPA marketing and are promoting an offer that has different links for traffic from different countries. Every wish there was a way to separate the traffic and redirect it to the most relevant offers from one link. This video below explains how to setup geo location redirects using cloud flare and a very simple PHP scrips.

Follow the instructions exactly. Here is the script below. To use this script copy and paste this source code in a text pad. Save as .php file and upload this to your web host.

 

<?php $country_code = $_SERVER[“HTTP_CF_IPCOUNTRY”];

if ($country_code==”US”) {
$link = ‘http://www.ifmsn.com/applynow‘;
}

elseif ($country_code==”GB”) {
$link = ‘http://www.ifmsn.com/applynow‘;
}

elseif ($country_code==”UK”) {
$link = http://www.ifmsn.com/applynow‘;
}

else { $link = ‘http://startthenprofit.com/makemoney‘;
}

header(“location:$link”);
exit;

?>

For a list of country codes message me on facebook. http://www.facebook.com/joinwithmatthew

Leave a Reply

Top