1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

my peerfly Geo-redirect script

Discussion in 'BlackHat Lounge' started by CeaseFireBlack, May 23, 2016.

  1. CeaseFireBlack

    CeaseFireBlack Regular Member

    Joined:
    Jun 10, 2015
    Messages:
    421
    Likes Received:
    151
    so i found a script how to geo redirect visitors based on their IP, i tried to customize it for my needs but there is an error, banner appears but it's not clickable, i'm very foreign to html, this is what i got:



    <script src="//j.maxmind.com/app/geoip.js" charset="ISO-8859-1" type="text/javascript"></script>

    <script>

    var target = new Array(); // Target Array, Don't remove this.


    // Here's an example which redirects visitors to your specified URL for your targeted country code:


    target['NL'] = " Offer - URL";

    target['UK'] = " Offer - URL";

    target['IE'] = " Offer - URL";
    target['AU'] = " Offer - URL";

    target['NZ'] = " Offer - URL";

    target['ES'] = " Offer - URL";

    target['FR'] = " Offer - URL";

    target['US'] = " Offer - URL";

    target['CA'] = " Offer - URL";




    /* == DON'T EDIT THE BELOW CODE == */

    var visitorCountryCode = geoip_country_code();

    var redirectURL = target[visitorCountryCode];

    if(redirectURL == null) redirectURL = target['All'];

    if(redirectURL) window.top.location.href = redirectURL;

    /* == DON'T EDIT THE ABOVE CODE == */

    </script>

    <img src='BANNER IMAGE - URL' />
     
    Last edited: May 23, 2016