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

[FREE] Fake Referrer Script, tested in Chrome, Firefox and IE.

Discussion in 'Black Hat SEO' started by MarketerX, Mar 15, 2015.

  1. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Hey everyone, I used too use CPA Redirector 2 a few years ago, but the author of that plugin closed his site down, so I decided to write a quick, simple script to fake the HTTP referrer. I will also explain how to use it.

    Let's say you have an offer on a CPA network where Facebook traffic is not allowed, but you want too promote that offer on Facebook. Obviously your network wouldn't be OK with that, because they check the HTTP referrer for any requests too your affiliate link. So, what you want to do is fake the referrer, and make sure one is sent to your affiliate link that is not from facebook.com

    The trick to doing this is to place this code ABOVE THE <HTML> TAG on a "white hat" page promoting the offer you are spamming, make sure this page is following your CPA networks rules for that offer, such as no use of the word "Free".

    Code:
    <?php
    
        $secret = "secretpassword";
        $afflink = "http://afflinkhere.com/";
    
    
        if ($_GET["token"] == $secret) {
            $url = strtok($_SERVER["REQUEST_URI"],'?');
            setcookie("var", $secret, time()+3600);  /* expire in 1 hour */
            echo "<script>window.location.href = \"" . $url . "\"</script>";
        }
    
    
        if (isset($_COOKIE["var"]) && $_COOKIE["var"] == $secret) {
            setcookie("var", "", time()-3600);  /* unset cookie */
            echo "<script>window.location.href = \"" . $afflink . "\"</script>";
        }
    
    
    ?>
    
    Let's assume that your white hat url where you placed this code is http://whitehat.com/some-landing-page.php

    Now the link you would want to spam on facebook (after using a URL shortener) would be http://whitehat.com/some-landing-page.php?token=secretpassword

    The beauty of this is, if you do not add ?token=secretpassword too the URL, some-landing-page.php will show it's normal, white hat content. And when your affiliate manager checks your traffic logs and referrers, they will see http://whitehat.com/some-landing-page.php, without the secret token. Also the code I posted above will not appear if they view the source of your page, since it is written in PHP, only someone with access too your server or knows the secret password will know it's there.

    I know this is a super-simple form of faking the referrer, but it works in the latest version of all major browsers. Make sure you change the hardcoded secret password and affiliate link, and place the code ABOVE THE <HTML> TAG on the page you want your affiliate manager too think your traffic is coming from.
     
    • Thanks Thanks x 31
    Last edited: Mar 15, 2015
  2. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Updated code too properly remove secret cookie before the redirect to your affiliate link occurs.
     
    Last edited: Mar 15, 2015
  3. godspeed007

    godspeed007 Jr. VIP Jr. VIP

    Joined:
    Jan 10, 2013
    Messages:
    740
    Likes Received:
    273
    This is epic man! I think you just doubled my CPA earnings!

    Godspeed!
     
    • Thanks Thanks x 1
  4. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Glad someone appreciates this, using this, you can do all kinds of nifty tricks, like content locking, incents when they aren't allowed, iframed email submits (just mix in some legit traffic too keep your EPC under the radar.) Personally I am using this too spam blogs with Scrapebox and not get banned for my traffic source ;)

    When my AM asks about my traffic I just tell them I am running a AdWords or Facebook PPC campaign too my whitehat site, the one they will see in their referral logs.
     
    Last edited: Mar 15, 2015
  5. jprID

    jprID Newbie

    Joined:
    Mar 4, 2014
    Messages:
    4
    Likes Received:
    1
    Location:
    Indonesia
    it's really interested, can i use it on peerfly?
     
  6. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Yes, you can. Just put your peerfly offer link in the script, and make sure the page you put the code on is totally whitehat and follows that particular offers rules, some peerfly offers you cant use the word "free" on your landing page, for example. If you want too do a free iphone email submit, make sure the page you put the code I posted on has a peerfly banner or link too that particular offer.
     
  7. shezboy

    shezboy Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 17, 2008
    Messages:
    3,910
    Likes Received:
    5,489
    Gender:
    Male
    Location:
    UK
    Totally brilliant share there. Nice one. This really does have value and multiple uses.

    Thanks,

    Shez
     
    • Thanks Thanks x 1
  8. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    You're welcome Shez :)
     
  9. eXampL

    eXampL Power Member

    Joined:
    Jan 24, 2015
    Messages:
    512
    Likes Received:
    370
    Simple and effective. Thanks!!
     
    • Thanks Thanks x 1
  10. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Just the way it should be :) I'm thinking about making a WP plugin and also giving it away for free, I'm sure alot of people use WP on their white hat sites but might not know how to use this code with WP. Actually, you can right now, just go into your admin panel, then Appearance -> Editor, click Header.php and add this too the very top of that file and update. Then you can access any blog post, by adding ?token=secretpasswordhere to the end of your blog posts URL, and your AM will think your traffic is coming from whatever blog post you added ?token=secretpasshere too. So remember, when you spam, use a link like yourwhitehatblog.com/some-wp-blog-post.php?token=secretpasswordhere (also, remember to use a URL shortener when spamming, too keep automated spam filters from recognizing it), your AM will never know what site(s) your traffic came from if you do this. Will update this maybe today too work with multiple rotating offers, since it is only hardcoded for one right now.

    If anyone has any questions or feature requests, post em here.
     
    Last edited: Mar 15, 2015
  11. MarketerX

    MarketerX Regular Member

    Joined:
    Mar 7, 2010
    Messages:
    404
    Likes Received:
    121
    Interesting, so it blanks the referrer? Blanking obviously hides your traffic source, but also raises a red flag too your AM. However, if you traffic is converting for their advertisers, they are less likely too really care that your referrer is blanked. Faking is much better imo, because usually they expect too see a referrer in their logs.

    If you want the ultimate referrer leak protection, blank then fake :)
     
  12. simno

    simno Junior Member

    Joined:
    Apr 20, 2012
    Messages:
    191
    Likes Received:
    44
    Gender:
    Male
    Occupation:
    Web Developing, Online Marketing, Graphic Design
    This one is so simple :)
     
  13. Scraper9

    Scraper9 Jr. VIP Jr. VIP

    Joined:
    Feb 8, 2015
    Messages:
    609
    Likes Received:
    706
    Location:
    Evropa bro
    OP this is very powerful thing, I like it very much, thanks. Do you think that big G can sense this type of deception? Did you manage to observe the effect on G analytics?
     
  14. tonybao

    tonybao Power Member Premium Member

    Joined:
    Apr 24, 2013
    Messages:
    530
    Likes Received:
    45
    Home Page:
    Great share . Thanks
     
  15. peterstern9

    peterstern9 Regular Member

    Joined:
    Mar 31, 2013
    Messages:
    275
    Likes Received:
    59
    thank you really!
     
  16. unsaidscript

    unsaidscript Junior Member

    Joined:
    Oct 3, 2011
    Messages:
    150
    Likes Received:
    40
    Gender:
    Male
    Occupation:
    Student
    Location:
    ************************ India *******************
    Home Page:
    great share :)
    Thanks for it
     
  17. Freedoom

    Freedoom Regular Member

    Joined:
    Apr 16, 2009
    Messages:
    206
    Likes Received:
    15
    Does anyone manage to work this with mobile? only working on desktop here...Also if I use firefox in private mode it doesnt work
     
  18. Y M C M B

    Y M C M B Power Member

    Joined:
    Sep 19, 2012
    Messages:
    622
    Likes Received:
    117
    Great share op, does this work with mobile too ?
     
  19. Freedoom

    Freedoom Regular Member

    Joined:
    Apr 16, 2009
    Messages:
    206
    Likes Received:
    15
    not work with me
     
  20. fc-dh

    fc-dh Elite Member

    Joined:
    Oct 20, 2012
    Messages:
    1,854
    Likes Received:
    1,435
    Occupation:
    Blackhatting
    Location:
    Den Haag | Netherlands
    This doesn't work for mobile traffic, i keep seeing my FB refers, anyone knows a refer faker for mobile traffic :)
     
    • Thanks Thanks x 1