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

does this hide my referral link ?

Discussion in 'Cloaking and Content Generators' started by ramyelprince, Nov 21, 2014.

  1. ramyelprince

    ramyelprince Junior Member

    Joined:
    Nov 25, 2010
    Messages:
    192
    Likes Received:
    162
    Location:
    Egypt
    i have shortened my aff link with goo.gl and then used this code


    does this prevent the advertiser or my network from seeing my ref link ?

    <html>
    <head>
    <title>test</title>
    </head>


    <frameset cols="*,1" frameborder="0" framespacing="0" border="0">
    <frame src="aff link" border="0" frameborder="0" name="main" noresize scrolling="auto"></frameset>
    <noframes></noframes>
    </html>
     
  2. mrblackjack

    mrblackjack Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 6, 2011
    Messages:
    960
    Likes Received:
    553
    Occupation:
    I live alone, I work alone, I make money alone
    Location:
    G00gle LaNd
    No, it wont help you. if you want to hide your referrer value, you need something more advanced. look for a plugin named: CPAr redirector. Though it's a WP plugin, still, you can read the code and understand the method. Basically, they are using JS self form submits to reload the new referrer (the fake one), and then fake ref sends the hit towards your way creating actually a new referrer value (the fake one)
     
  3. remon24

    remon24 Power Member

    Joined:
    Oct 3, 2012
    Messages:
    500
    Likes Received:
    404
    Location:
    NEW DELHI
    You do know that just by adding a "+" in the goo.gl url they can see the referrer site.
     
  4. adarshbio4

    adarshbio4 Regular Member

    Joined:
    Aug 3, 2013
    Messages:
    361
    Likes Received:
    367
    I found this code better on another site
    Use this code
    Make it in blogger or something

    Code:
    <?php
    
    // Extract URI minus http://yourblog.blogger.com
    $req_url = $_SERVER['REQUEST_URI'];
    
    function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; }
    function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); }
    $full_url = selfURL();
    
    // Extract the urls which we need
    $script_name = $_SERVER['SCRIPT_NAME'];
    $current_file = basename(__FILE__);
    $dir = str_replace($current_file,'',$script_name);
    $dir .= '?';
    $offer = str_replace($dir,'',$req_url);
    $offer = remove_attempt($offer);
    
    $fallback = 'http://www.google.com/'; 
    
    if (!isset($_REQUEST['attempt'])) $_REQUEST['attempt'] = 0;
    
    switch ($_REQUEST['attempt']) {
        case 0:
            echo method0($offer,$full_url);
            break;
        case 1:
            echo method1($offer,$full_url);
            break;
        case 2:
            echo method2($offer,$full_url);
            break;
        case 3:
            echo method3($offer,$fallback);
            break;
        default:
            echo method0($offer,$full_url);
    }
    
    function method0($offer,$full_url) {
        $txt = '';
        $referer = '';
        if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER'];
        if ($referer == '' ) {
           // If blank redirect
          header('Location: '.$offer);
        } else {
            // Use method 0 to blank -> works mostly for IE and FF
            $txt = '<meta http-equiv="refresh" content="0; url='.$full_url.'&attempt=1">'; 
        }
        
        return $txt;
    }
    
    function method1($offer,$full_url) {
        $txt = '';
        $referer = '';
        if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER'];
        if ($referer == '' ) {
           // If blank redirect
           header('Location: '.$offer);
        } else {
            // Use method 1 to blank
            $txt = '<script>
              function go(){
            window.frames[0].document.body.innerHTML=\'<form target="_parent" method="post" action="'.$full_url.'&attempt=2">';
            $txt .= '</form>\';
                window.frames[0].document.forms[0].submit()
              } 
            </script>
            <iframe onload="window.setTimeout(\'go()\', 99)" src="about:blank" style="visibility:hidden"></iframe>';
        }    
            
        return $txt;
    }
    
    function method2($offer,$full_url) {
        $txt = '';
        $referer = '';
        if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER'];
        if ($referer == '' ) {
           // If blank redirect
           header('Location: '.$offer);
        } else {
            // Use method 2 to blank
            $txt = '<iframe src="javascript:parent.location=\''.$full_url.'&attempt=3\'" style="visibility:hidden"></iframe>';
        }    
            
        return $txt;
    }
    
    function method3($offer,$fallback) { // All methods tried
        $referer = '';
        if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER'];
        if ($referer == '' ) {
           // If blank redirect
           header('Location: '.$offer);
        } else {
           // No methods remaining -> send to fallback
           header('Location: '.$fallback);
        }    
            
        return $txt;
    }
    
    function remove_attempt($url) {
        $i = strpos($url,'&attempt=');
        if ($i > 0 ) $url = substr($url,0,$i);
        
        return $url;
    }
    
    function create_parameters($url) {
        $p1 = strpos ($url, '?');
        $p = array();
    
        if ($p1 > 0 ) {
            $url_no_par = substr ($url , 0, $p1);
            $p1 = $p1 + 1;
            $url_par = substr ($url , $p1);
            $paryval = explode ('&', $url_par);
            foreach ($paryval as $value) {
                $p[] = explode ('=',$value);
            }
        }
        
        return $p;
    }
    
    ?>
     
    Last edited: Nov 22, 2014