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

How do I change my target page of a squeeze page according to location ??

Discussion in 'Black Hat SEO' started by Meloman, Sep 3, 2013.

  1. Meloman

    Meloman Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 24, 2013
    Messages:
    361
    Likes Received:
    168
    Occupation:
    SERP Killer
    Location:
    NYC
    Home Page:
    My method making money is ranking sites and videos ==>> take to squeeze page==>> offer. However the offer I promote is only valid in 4 countries and if the country is not in the list of four countires the cpa payout falls. As a result, I did the math and my conversions and epc would be a lot better if I find a way to direct traffic from the 4 countries to my original offer and all others to another cpa offer.

    My question is how do I do this????
     
  2. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
    • Thanks Thanks x 1
  3. crazyflx

    crazyflx Elite Member

    Joined:
    Nov 9, 2009
    Messages:
    1,674
    Likes Received:
    4,825
    Location:
    http://CRAZYFLX.COM
    Home Page:
    If you're looking to handle this on your own server and the CPA network you're using doesn't offer "inbuilt" geo-targeting, you can do one of two things.

    Either install your own geotargeting script on your server (I made a thread about this a VERY long time ago here: http://www.blackhatworld.com/blackh...-how-set-up-your-own-geotargeting-script.html ) and there are plenty of results you'll get googling: set up geo targeting script

    Another (much faster) solution, is to purchase credits at GeoIP Country Lookup credits from MaxMind here: https://www.maxmind.com/en/cart?add_product_id=301&quantity=200000

    It costs $20 for 200,000 queries. If you go with the latter solution, once you've got your authorization key, you'd use the following code (modify it to how you see fit):

    Code:
    <?php 
    
    
    $ip = getenv("REMOTE_ADDR");
    
    
    $country = file_get_contents('https://geoip.maxmind.com/a?i=' . $ip . '&l=YOUR-MAX-MIND-AUTH-KEY');
    
    //if the country the visitor lives in is either the US, FR, CA or UK then show them one thing
    if ( ($country == 'US') || ($country == 'FR') || ($country == 'CA') || ($country == 'UK')) { ?>
    
    //HTML code for what you want to show visitors from the US, FR, CA or UK goes here.  Alternatively, you could do a redirect to the page for visitors to those countries
    
    <?php } else { ?>
    
    //HTML code for what you want to show visitors that aren't from one of those four countries.  Alternatively, you could do a redirect to the page for visitors NOT from those countries
    
    <?php } ?>
    
    
    
     
    • Thanks Thanks x 1
  4. Meloman

    Meloman Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 24, 2013
    Messages:
    361
    Likes Received:
    168
    Occupation:
    SERP Killer
    Location:
    NYC
    Home Page:

    Ok, I have an hour trying to figure out what to do with this code you gave me. I didn't wan't to bother you, but I have no idea what to do with this code. I am going to go with the maxmind method, I still haven't purchased it though.

    Can you direct me a little more on what I am supposed to do with this.

    I have a wordpress site and host it with hostgator.

    I need help.
     
  5. crazyflx

    crazyflx Elite Member

    Joined:
    Nov 9, 2009
    Messages:
    1,674
    Likes Received:
    4,825
    Location:
    http://CRAZYFLX.COM
    Home Page:
    Sorry, I'm a little beyond the hour mentioned you had, but I'll reply any way in case you can use this.

    I'm going to use the redirect method instead of showing different HTML code because it's easier for me to explain and the end result is essentially the same.

    Install this plugin on your wordpress site: http://wordpress.org/plugins/exec-php/ (don't worry, it says it hasn't been updated in over two years, but it works with every version of wordpress I've ever used, including the latest version).

    Then make two landing pages using the regular method of making pages within wordpress. For my example I'm going to say you called them: in-four-countries | not-in-four-countries

    Let's say the link to each is: http://yoursite.com/in-four-countries and the other is http://yoursite.com/not-in-four-countries

    Once you have both of those pages created and you have the CPA offers set up on them in whatever method you're using to setup offers, create one more page. Call this page (for example): determine-country and it's url is http://yoursite.com/determine-country

    After you have installed exec-php, make page content of "determine-country" this:

    Code:
    <?php 
    $ip = getenv("REMOTE_ADDR");
    $country = file_get_contents('https://geoip.maxmind.com/a?i=' . $ip . '&l=YOUR-MAX-MIND-AUTH-KEY');
    if ( ($country == 'US') || ($country == 'FR') || ($country == 'CA') || ($country == 'UK')) { 
    header("Location: https://yoursite.com/in-four-countries"); 
    exit;
    } else {
    header("Location: https://yoursite.com/not-in-four-countries"); 
    exit;
    } 
    ?>
    
    Obviously change the country codes to whatever the countries are that you want to see offer X on the "in four countries" page.

    Save the "determine-country" page, and make that page the page you send all traffic to. It will determine if they are in one of the four countries you want to see offer X and redirect them to it and if they aren't in one of those four countries it will redirect them to the other page.
     
    • Thanks Thanks x 2
  6. Meloman

    Meloman Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 24, 2013
    Messages:
    361
    Likes Received:
    168
    Occupation:
    SERP Killer
    Location:
    NYC
    Home Page:
    Hey thanks for the help. I followed your instructions but instead of going to the website it just shows it. Look at the code.

    <?php




    $ip = getenv("REMOTE_ADDR");




    $country = file_get_contents('https://geoip.maxmind.com/a?i=' . $ip . '&l=removed this');


    //if the country the visitor lives in is either the US, FR, CA or UK then show them one thing
    if ( ($country == 'US') || ($country == 'FR') || ($country == 'CA') || ($country == 'UK')) { ?>


    header("Location: https://google.com");


    <?php } else { ?>


    header("Location: https://youtube");
    exit;
    <?php } ?>

    it would show header("location:https://google"); instead of going to the website