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

Double meta refresh script. dmr.php?url=yoururl

Discussion in 'Black Hat SEO' started by dannyhw, Mar 20, 2009.

  1. dannyhw

    dannyhw Senior Member

    Joined:
    Jul 16, 2008
    Messages:
    980
    Likes Received:
    462
    Occupation:
    Software Engineer
    Location:
    New York City Burbs
    Just decided maybe I should start using these :p

    PHP:
    <?php

    /*
       Name this dmr.php
       Use: dmr.php?url=http://www.ebay.com/i-am-a-nice-affiliate
    */

    dmr();

    function 
    dmr() {
        
    $url $_GET['url']; 

        
    // Where you will send them if it fails
        
    $crap 'http://your-best-viagra-rimjobs.com/vicodin-sluts'
        
        
        if ( 
    $_SERVER['HTTP_REFERER'] == "" ) {
            
    // If it's blank, who the hell cares?
            
    refresh($url);
            die();
        } else if ( 
    $_GET['tried'] == '1' ) {
            
    // Already tried it, fuck it. Zango city.
            
    refresh($crap);
        } else {
            
    // Let's try this one more time
            
    refresh"dmr.php?url=" urlencode($url) . 
                
    "&tried=1" ); // I mean it, one more try
        
    }
    }

    function 
    refresh($url) {
        echo 
    "<meta http-equiv='refresh' content='0; url=$url'>";
    }

    ?>
     
  2. CSalt2

    CSalt2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 5, 2009
    Messages:
    753
    Likes Received:
    357
    where do you put the domain you want it to redirect too?

    Do you delete the sidenotes?
     
  3. luxint

    luxint Registered Member

    Joined:
    Jun 16, 2008
    Messages:
    68
    Likes Received:
    22
    You don't put the url anywhere, you pass it from the page that calls this page as a parameter just like the example shows you.

    Code:
    Use: dmr.php?url=http://www.ebay.com/i-am-a-nice-affiliate
    
    No you don't need to delete the comments as nobody sees them.

    L
     
  4. CSalt2

    CSalt2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 5, 2009
    Messages:
    753
    Likes Received:
    357
    what about the '//do it this way'

    should I delete those from the code or just copypaste the whole code?
     
    Last edited: Mar 21, 2009
  5. ShadeDream

    ShadeDream Elite Member

    Joined:
    Nov 27, 2008
    Messages:
    2,209
    Likes Received:
    5,230
    Location:
    He who laughs last, laughs longest.
    I wouldn't relay on a double meta refresh too much because it does leak.
     
  6. CSalt2

    CSalt2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 5, 2009
    Messages:
    753
    Likes Received:
    357

    what do you rely on instead?