How to Redirect differents URL based on the country ?

IlyesPoke

Banned - PM spamming.
Joined
Nov 25, 2017
Messages
305
Reaction score
41
Hi everybody !
Someone knows how to redirect a domain to different affiliation links depending on the viewer's country to optimize membership gains?
 
Geo redirect script, that's what you need. If you search for it, you'll find multiple solutions on BHW.
 
Something like this. Test the code yourself.
Code:
<?php
if (isset($_SERVER['HTTP_CLIENT_IP']))
    $real_ip_adress = $_SERVER['HTTP_CLIENT_IP'];
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
    $real_ip_adress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else
    $real_ip_adress = $_SERVER['REMOTE_ADDR'];

$cip = $real_ip_adress;
$iptolocation = 'http://api.hostip.info/country.php?ip=' . $cip;
$creatorlocation = file_get_contents($iptolocation);

$t = 'Location: https://www.rooturl.com/';
if ($creatorlocation == "whatever")
    header($t.'whatever-page.html');
elseif ($creatorlocation == "whatever2")
    header($t.'whatever-page-2.html');
else
    header($t.'some-default-page.html');
?>
 
Hi everybody !
Someone knows how to redirect a domain to different affiliation links depending on the viewer's country to optimize membership gains?
I think you can purchase Zerobounce WP plugin. You can set with your affiliate link as per your country target location. it will cost you around$49.
 
I think you can purchase Zerobounce WP plugin. You can set with your affiliate link as per your country target location. it will cost you around$49.
It's not for just a website WordPress or i can with a domain 1and1 ?
 
If you already have the domain, WP is free to install. That's a WP plugin, so it will only work with a WP site.
Okey thanks and i can do that with clickmagic even no?
 
Back
Top