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

Offer Rotating Double Meta W/ Referrer Check

Discussion in 'Black Hat SEO Tools' started by Diabolik, Aug 21, 2008.

  1. Diabolik

    Diabolik Newbie

    Joined:
    Apr 11, 2011
    Messages:
    4
    Likes Received:
    0
    Ok, I mashed up a bunch of code from another thread and made a nice little script.

    Keep in mind, I am not a programmer...I can just put things together and test until it seems to work. Much like how Edison worked; Trial and Error...

    Ok, so here's what I've come up with:

    The challenge...

    I wanted a script that could hide traffic from affiliate networks by checking if a blank referrer was being passed along during a double meta refresh and would boot the redirect if it passed along a referrer, but I also wanted to be able to alternate offers and mix up the traffic a little.

    This way there isn't just one offer converting at a super high % and you could rig it with another offer that you KNOW will never convert and keep the numbers down....

    Here we go -

    First create a text file called "offers.txt" in notepad and just list a few urls for testing purposes (you can change these to you affiliate urls later)

    List them like this, one on top of the other:

    Code:
    www.google.com
    www.myspace.com
    www.badgerbadgerbadger.com 
    
    (Note: Don't put the http:// part in there.)

    Ok, that part's done...upload to server.

    Now create a text file called "vip.php" in notepad and copy and paste this into it...

    Code:
    <?php
    
    echo "<meta http-equiv=\"refresh\"content=\"0;url=go.php\">";
    
    ?>
    Ok, that part's done...upload to server.

    Now create a text file called "go.php" in notepad and copy and paste this into it...

    Code:
    <?php
    
    // Open the File with offers to rotate
    $sites = array_map("trim", file("offers.txt"));
    
    // Choose a random site to shows
    $redirect = $sites[array_rand($sites)];
    
    $referer = $_SERVER['HTTP_REFERER']; if($referer == "")
    
    //make the meta refresh to the random site in variable redirect
    echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">";    
    
    ?>
    Ok, that part's done...upload to server.

    Now you're done. To test it, just go to the first link in the chain...

    Code:
    http://www.yourdomain.com/vip.php
    That's it! If anybody more knowledgeable wants to clean up the code or add anything special - you're welcome to it.

    Love,
    D

    P.S. Special thanks to Genjutsu, Foxler, and Gestserver.
     
    • Thanks Thanks x 4
    Last edited by a moderator: Aug 21, 2008
  2. arctic

    arctic BANNED BANNED

    Joined:
    Apr 17, 2007
    Messages:
    50
    Likes Received:
    6
    handy... thanks.

    One thing where does the script kick the visitor to if the referer is not scrubbed ?
    Would be handy if you could redirect the non-scrubbed traffic to another url.. somewhere that will still make a few $ but your not worried if the referers there..:)

    Just a thought..
     
  3. Diabolik

    Diabolik Newbie

    Joined:
    Apr 11, 2011
    Messages:
    4
    Likes Received:
    0
    Good question and I think they get hung in limbo. Maybe someone could add something to the code so we have a say in it...like they could get sent to gay porn for being so stupid as to not use the browser we want them to.
     
  4. Diabolik

    Diabolik Newbie

    Joined:
    Apr 11, 2011
    Messages:
    4
    Likes Received:
    0
    I take that as a compliment coming from you. Let me know when your script is ready.
     
  5. phreak3r

    phreak3r Newbie

    Joined:
    Jul 8, 2008
    Messages:
    25
    Likes Received:
    8
    thanks I'm going to try using this. Do you know if this can be combned with any geotargeting script?
     
  6. JohnDoe

    JohnDoe Junior Member

    Joined:
    Dec 28, 2007
    Messages:
    159
    Likes Received:
    21
    Take a look at http://www.maxmind.com/app/geolitecountry you could use there free database to do a lookup query.
     
  7. grafx77

    grafx77 BANNED BANNED

    Joined:
    Mar 6, 2007
    Messages:
    445
    Likes Received:
    212
    Hey Diabolik,

    Is there anyway to use the script to open up multiple domains, so just instead of opening up randomly, you can open up all of them???
     
  8. oscarslater

    oscarslater Regular Member

    Joined:
    Mar 13, 2008
    Messages:
    401
    Likes Received:
    152
    I am also not a programmer but I like the look and feel of this

    It would be great to be able to get something from the clicks that are really just going away nowhere

    good work Diabolic

    what would also be good would be a way to have the traffic go from one domain to the next always checking the referer was blank and this way we would get a click on every offer in the list, kinda like out own traffic generation program ... or is this asking too much

    oscar
     
  9. grafx77

    grafx77 BANNED BANNED

    Joined:
    Mar 6, 2007
    Messages:
    445
    Likes Received:
    212
    Yeah...that was kinda what I was asking in my post above. ;)
     
  10. Gestserver

    Gestserver Newbie

    Joined:
    Apr 1, 2008
    Messages:
    12
    Likes Received:
    3
    Hi,

    Is that why this forum is so great, here we can see how someone catch some code lines and 5 days later is posting an explained post.

    Good Job.

    About geo tracking i use this database:
    hxxp://software77.net/cgi-bin/ip-country/geo-ip.pl

    You can create an ip2country database and then check the country using the IP.


    Example:

    <?
    // Retrieve visitor IP
    $ipaddress = getenv(REMOTE_ADDR);

    // Replace this MYSQL server variables with actual configuration
    $mysql_server = "localhost";
    $mysql_user_name = "YourDatabase Username";
    $mysql_user_pass = "YourDatabase Password";

    // Convert IP address to IP number for querying database
    $ipno = Dot2LongIP($ipaddress);

    // Connect to the database server
    $link = mysql_connect($mysql_server, $mysql_user_name, $mysql_user_pass) or die("Could not connect to MySQL database");

    // Connect to the IP2Location database
    mysql_select_db("Your Server Database", $link) or die("Could not select database");

    // SQL query string to match the recordset that the IP number fall between the valid range
    $query = "SELECT * FROM ip2country WHERE $ipno <= ipto AND $ipno>=ipfrom";

    // Execute SQL query
    $result = mysql_query($query, $link) or die("IP2Location Query Failed");

    // Retrieve the recordset (only one)
    $row = mysql_fetch_object($result);

    // Keep the country information into two different variables
    $countrySHORT = $row->ctry;
    $countryLONG = $row->country;

    // Free recordset and close database connection
    mysql_free_result($result); mysql_close($link);

    // Function to convert IP address (xxx.xxx.xxx.xxx) to IP number (0 to 256^4-1)
    function Dot2LongIP ($IPaddr) {
    if ($IPaddr == "")
    {
    return 0;
    } else {
    $ips = split ("\.", "$IPaddr");
    return ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256);
    }
    }
    ?>
     
    Last edited: Aug 25, 2008