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

How To DMR - 100% Safe

Discussion in 'Black Hat SEO' started by Alex Brooks, Oct 4, 2009.

  1. Alex Brooks

    Alex Brooks BANNED BANNED

    Joined:
    Mar 17, 2009
    Messages:
    1,199
    Likes Received:
    297
    Index.php
    Code:
    <?php
    echo "<meta http-equiv=\"refresh\" content=\"0;url=second.php\">";
    ?>
    
    Second.php
    Code:
    <?php
    $sites = array_map("trim", file("links.txt"));
    $redirect = $sites[array_rand($sites)];
    $referer = $_SERVER['HTTP_REFERER']; if($referer == "")
    echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">"; 
    else
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.google.com\">";  
    }
    ?> 
    
    Links.txt
    Code:
    secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=affid
    
    Do not include www or http:// in links.txt

    Instead of most DMR methods, this is 100% safe (As far as I know) because of this:
    Code:
    $referer = $_SERVER['HTTP_REFERER']; if($referer == "")
    echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">"; 
    else
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.google.com\">";  
    }
    ?>
    For those of you who don't understand PHP, it basically says, if the referrer is blank, then redirect to a link in links.txt - But if it isn't blank, then go to google :)
     
    • Thanks Thanks x 7
  2. SpazzyMcSpazz

    SpazzyMcSpazz Regular Member

    Joined:
    Apr 20, 2009
    Messages:
    261
    Likes Received:
    76
    Checking if the referer is blank is not new. What were you using before that??

    here's a single page version from drkenneth I believe

    Code:
    <?php
    //Grab arguments from the GET string
    $SEC = $_GET['S'];
    
    //If on second bounce SEC = 1
    if ( $SEC == '1' )
    {
     //Validate (make sure the referer cleared)
     if ( $_SERVER['HTTP_REFERER'] == '' )
     {
       //Landing page
       $bounce_loc='referer.php';
     }
     else //Bad! dump them somewhere!
     {
       //Dump location (for metas that didn't clear)
       $bounce_loc="http://www.google.com";
     }
    }
    else //First time through--bounce them back!
    {
     $self = $_SERVER['SCRIPT_NAME'];
     $bounce_loc="$self?S=1";
    }
    ?>
    
    <html>
    <head>
    <?php
    print("<meta http-equiv=refresh content='0;url=$bounce_loc'>");
    ?>
    </head>
    <body>
    
    </body>
    </html>
     
  3. Alex Brooks

    Alex Brooks BANNED BANNED

    Joined:
    Mar 17, 2009
    Messages:
    1,199
    Likes Received:
    297
    I never said it was new, I've seen a couple of posts with DMR scripts which will leak, so I posted this one which doesn't leak and also has the option to send the traffic to differnt pages, so if your promoting [offer1] and you have [offer1] on 10 networks, you can add 10 differnt links in one page, so it'll spread out your earnings instead of just one.
     
  4. lexus7

    lexus7 Newbie

    Joined:
    Oct 11, 2008
    Messages:
    31
    Likes Received:
    4
    iv tried this on IE 8, it does not work.. i get an error about not being able to modify header information
     
  5. kodkod

    kodkod Registered Member

    Joined:
    Aug 15, 2009
    Messages:
    58
    Likes Received:
    11
    Occupation:
    CTO
    Location:
    Israel
    I would suggest redirecting to about:blank if there is still a referer that way u don't spend extra loading time on your page
     
  6. paper_chase

    paper_chase Regular Member

    Joined:
    Oct 17, 2008
    Messages:
    394
    Likes Received:
    42
    I truly believe the best way to redirect is to do a DMR on a secure domain. ie:

    youraffiliatelandingpage.com > DMR on https domain > affiliatepage.com

    That way you will successfully blank on all major browsers. Browsers that don't support DMR should support blanking via https, and vice versa.

    Try it out!
     
  7. Krazie

    Krazie Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 27, 2009
    Messages:
    266
    Likes Received:
    197
    Home Page:
    Wee thanks, I was just about to write a script to do this in php, but this saved me about 5 minutes. We all know time is money. Thanks again ;)
     
    • Thanks Thanks x 1
  8. namso

    namso Registered Member

    Joined:
    Aug 26, 2009
    Messages:
    88
    Likes Received:
    11
    isnt working for me

    something about the array rand on lines 2 and 3 of second.php

    can anyone help me out?

    EDIT: problem solved!
     
    Last edited: Oct 26, 2009
  9. indy0077

    indy0077 Newbie

    Joined:
    Oct 3, 2009
    Messages:
    32
    Likes Received:
    3
    Hi, can I use DMR with CPA Redirector for Wordpress together? I have in the header.php on the firts line this
    Code:
    <?php if (prc_red()) exit(); ?>
    Thanks for some help.
     
  10. indy0077

    indy0077 Newbie

    Joined:
    Oct 3, 2009
    Messages:
    32
    Likes Received:
    3
    How can I randomize the links in the links.txt

    Thanks
     
  11. xr4ti

    xr4ti Registered Member

    Joined:
    May 27, 2009
    Messages:
    72
    Likes Received:
    9
    • Thanks Thanks x 1
  12. indy0077

    indy0077 Newbie

    Joined:
    Oct 3, 2009
    Messages:
    32
    Likes Received:
    3
    Thanks, but if the page load new, then the process start every time by e.g. Link 1, right?
     
  13. xr4ti

    xr4ti Registered Member

    Joined:
    May 27, 2009
    Messages:
    72
    Likes Received:
    9
    I found that the above solution as well as the normal double meta refresh below loops for safari.

    index.php
    HTML:
    <?php
    echo**"<meta**http-equiv=\"refresh\"**content=\"0;url=http://www.yoursite.com/goto2.php\">";
    ?>
    goto2.php
    HTML:
    <?php
    $referer= $_SERVER['HTTP_REFERER'];
    
    echo $referer;
    if($referer=="")
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://stardrifter.org/cgi-bin/ref.cgi\">";
    }
    else
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://yoursite.com\">";
    }
    ?>
    Both solutions that do a double meta refresh (DMR) go into a never ending loop while using Safari 3.1.2 on mac. From what I've read Safari passes the referer differently then other browsers and it's loops forever. Anyone have some thoughts on how to break it? A client side javascript browser sniff for Safari could break it but what if the user shuts off javascript? Not the end of the world to me as it's such a small user base of people. I just really wanted to point it out to others that may not realize it and see if anyone has idea's on how to fix it or may have a solution already.


    Does a secure ssl license on the first domain prevent this? (i can't currently test this)



    @indy0077 try it out. I think that the code already randomizes what line it grabs. I'm not great with php but this line
    HTML:
    $redirect = $sites[array_rand($sites)];
    says randomize the array to me.



    UPDATE: It also loops for Google chrome and opera 10.00 Alpha. Does anyone have a work around for this? If you need to see an example PM me.
     
    Last edited: Nov 11, 2009
  14. three3s

    three3s Regular Member

    Joined:
    Feb 17, 2009
    Messages:
    306
    Likes Received:
    195
    I believe I've successfully set up a DMR but I'm not sure how to test it?

    I've tried google but have yet to find a clear way to test if the referrer is being banked or not. I want to make sure before I start promoting obviously.

    Anyone got any ideas?
     
  15. oldenstylehats

    oldenstylehats Elite Member Premium Member

    Joined:
    Apr 10, 2008
    Messages:
    1,893
    Likes Received:
    1,196
    Setup a page on your own server and put the following code in it:
    PHP:
    <?php
        
    echo 'Referer: '.$_SERVER['HTTP_REFERER'];
    ?>
    Use that page as the "end point" of your DMR.

    That is about as accurate as you can get. Remember that every browser treats these sorts of redirects differently though. The classic DMR fails miserably on a few of the newer browsers.
     
  16. three3s

    three3s Regular Member

    Joined:
    Feb 17, 2009
    Messages:
    306
    Likes Received:
    195
    Thanks mate,

    I'm using the exact DMR described by the OP, are you saying that this DMR may fail with newer browsers even with the redirect to google if the referrer can't be hidden? Or were you referring to other examples of DMR's on the forum?
     
  17. oldenstylehats

    oldenstylehats Elite Member Premium Member

    Joined:
    Apr 10, 2008
    Messages:
    1,893
    Likes Received:
    1,196
    No, his code should work fine for browsers that can be DMR'ed and shouldn't leak the referer for those that can't.
     
    • Thanks Thanks x 1
  18. indy0077

    indy0077 Newbie

    Joined:
    Oct 3, 2009
    Messages:
    32
    Likes Received:
    3
    Hi, knows anybody how can I use DMR with CPA redirector plugin for Wordpress? If I use the meta refresh option in the plugin, I can see still the magic number e.g. mn=ecommerce in my stats and the redirect url, in my case the url of a TE site.

    Thanks.
     
  19. SebastianJu

    SebastianJu Power Member

    Joined:
    Mar 27, 2008
    Messages:
    679
    Likes Received:
    130
    What about newer browsers and https? I mean the FF for example always wants to load a certificate and is warning the user that its not secure and so on... Is there a way to automatically load this certs without spending much money? Otherwise I think a lot visitors will be afraid or suspicious and dont want to go on.

    Greetings!
    Sebastian
     
  20. AUTOATTACKER

    AUTOATTACKER Registered Member

    Joined:
    Jul 16, 2008
    Messages:
    83
    Likes Received:
    23
    Home Page:
    Someone has set up DMR for me but it keeps leaking :( Im looking to blank referrer
    100%

    Please pm me :) I will pay for your help