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

geo script

Discussion in 'Black Hat SEO Tools' started by TheArticleMen, Nov 21, 2011.

  1. TheArticleMen

    TheArticleMen Regular Member

    Joined:
    Aug 30, 2009
    Messages:
    355
    Likes Received:
    59
    hey guys got ghostcpa and looking to make most of it by cakeslicing like 5offers
    uk
    usa
    canada ..etc

    and looking for a script that will detect there country and redirect accordingly to the right landing page
     
  2. xpwizard

    xpwizard Junior Member

    Joined:
    Nov 6, 2010
    Messages:
    198
    Likes Received:
    122
    (It's called slicing an offer, cakeslice is just a program).


    #1 - Download this file and unzip:
    Code:
    http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
    #2 - Create a file named "geoip.inc". Go to the link and include the code:
    Code:
    http://geolite.maxmind.com/download/geoip/api/php/geoip.inc
    #3 - Create a file named "geoipcity.inc". Go to the link and include the code:
    Code:
    http://geolite.maxmind.com/download/geoip/api/php/geoipcity.inc
    #4 - *OPTIONAL* - If you want State/Region data, make a file called "geoipregionvars.php", then go to the link and include the code:
    Code:
    http://geolite.maxmind.com/download/geoip/api/php/geoipregionvars.php
    #5 - Here is a demo version of the code (name file whatever you want):
    Code:
    http://geolite.maxmind.com/download/geoip/api/php/sample_city.php
    #6 - Upload all of those files into the same folder on your website... Here is a sample code to redirect by country:

    PHP:
    <?php    
        
    // include geo lookup
        
    include("geoip.inc");
        include(
    "geoipcity.inc");
        include(
    "geoipregionvars.php");

        
    // perform geo lookup
        
    $ip $_SERVER['REMOTE_ADDR'];
        
    $gi geoip_open("./GeoLiteCity.dat"GEOIP_STANDARD);
        
    $rsGeoData geoip_record_by_addr($gi$ip);

        
    // if USA
        
    if ($rsGeoData->country_code == "US") {
            
    header('Location: http://www.google.com/');
        }
        
    // if Canada
        
    else if ($rsGeoData->country_code == "CA") {
            
    header('Location: http://www.yahoo.com/');
        }
        
    // all other countries
        
    else {
            
    header('Location: http://www.ask.com/');
        }
    ?>
    #7 - Here is a sample to include the sliced page instead of just redirecting to it:

    PHP:
    <?php    
        
    // include geo lookup
        
    include("geoip.inc");
        include(
    "geoipcity.inc");
        include(
    "geoipregionvars.php");

        
    // perform geo lookup
        
    $ip $_SERVER['REMOTE_ADDR'];
        
    $gi geoip_open("./GeoLiteCity.dat"GEOIP_STANDARD);
        
    $rsGeoData geoip_record_by_addr($gi$ip);

        
    // if USA
        
    if ($rsGeoData->country_code == "US") {
            
    // if USA, include the sliced offer
            
    include('myoffer.php');
        }
        
    // all other countries
        
    else {
            
    header('Location: http://www.ask.com/');
        }
    ?>
    #8 - Here is a sample to have the sliced page html inside of the code:

    Code:
    <?php    
        // include geo lookup
        include("geoip.inc");
        include("geoipcity.inc");
        include("geoipregionvars.php");
    
        // perform geo lookup
        $ip = $_SERVER['REMOTE_ADDR'];
        $gi = geoip_open("./GeoLiteCity.dat", GEOIP_STANDARD);
        $rsGeoData = geoip_record_by_addr($gi, $ip);
    
        // if USA
        if ($rsGeoData->country_code == "US") {
            // if USA, show the sliced offer ?>
            <html>
            <head>
            </head>
            <body>
            put your html code here
            </body>
            </html>
            <?php
        }
        // all other countries
        else {
            header('Location: http://www.ask.com/');
        }
    ?>
     
    • Thanks Thanks x 2
  3. TheArticleMen

    TheArticleMen Regular Member

    Joined:
    Aug 30, 2009
    Messages:
    355
    Likes Received:
    59
    thanks ive figured it out :D now to make sure my refferer is faked from my AM