[TUT and CODE] How to Fake your Referer, Fake Referer Any Offer, Fake Referrer Script

i tried it on a different WP blog of mine and it worked perfectly. must be something conflicting on my other WP blog. Thanks for the help.
 
Johnson, do u have solution for faking ref without placing any code on domain of destination (referral) page ?

For example: I want to send traffic to CPA offer but for referral want to use google.com
 
Hey johnson thanks so much for the share! I just had a quick question about the second piece of code. I would like to put it into a wordpress post, page or in the header but i dont know where exactly to place the code.

What php file should i place the code into? Where is the header file exactly? Wgere exactly do i put the php code in he wordpress post? Thanks so much in advance!
 
Johnson, do u have solution for faking ref without placing any code on domain of destination (referral) page ?

For example: I want to send traffic to CPA offer but for referral want to use google.com

Sadly not.
The only current solution I'm aware of which would achieve this is by using Curl. However, the IP address which would then be carried by ALL your visitors to the destination page would be the IP address of the server on which you're running the script (the referrers would look good, but the same IP on all your visitors gives the game away).

The only way around it that I know of is either to run everything through a network of proxies (so users sent through your script have multiple IP addresses) or to use some form of botnet, which is a solution I believe some chinese traffic providers are currently using - but it's anyone's guess, and that is the blackest of all BH techniques, and not something I wish to get involved in, nor even to discuss.

Obviously there are others on BHW with greater knowledge than me, and perhaps there are other ways to achieve this which doesn't involve using Curl, or doesn't involve using the script's server IP address, but all my own research hit brick walls.
 
Hey johnson thanks so much for the share! I just had a quick question about the second piece of code. I would like to put it into a wordpress post, page or in the header but i dont know where exactly to place the code.

What php file should i place the code into? Where is the header file exactly? Wgere exactly do i put the php code in he wordpress post? Thanks so much in advance!

In the Wordpress admin dashboard, browse to the Appearance section, and then click on Editor.
You will arrive at a place which will allow you to edit the files which belong to your theme.
You should place the second part of the code in the header.php file.
Once you've done that, you can use ANY post or page on your WP site as a fake referer - in fact, you can even use a non-existent post, lol, but I wouldn't recommend it, as it somewhat defeats the purpose of spoofing in the first place!
 
EDIT: I got it working! I am so happy! It took me probably 30 hours of messing around with the url formatting and mod_ security and everything but I finally got it working properly :D.

Original message:

Unfortunately, I am also experiencing the issue with being redirected to my fake referer URL rather than my desired destination.

I have my handler domain named as index.php on it's own subdomain with this code (I am using the version of this modified by Percu which simply changes a few names of things and is verified to be working)

Code:
<?php
// Extract URI minus http://handlerdomain.com/
$full_url = urldecode($_SERVER['REQUEST_URI']);
// Extract urls we need
$l = strlen($full_url);
$p_referer = strpos ($full_url, 'referer=');
$p_dest_2 = $p_referer - 1;
$p_referer = strpos ($full_url, '=',$p_referer) + 1;
$url_referer = substr ($full_url , $p_referer);
$p_dest_1 = strpos ($full_url, '=') + 1;
$l = $p_dest_2 - $p_dest_1;
$url_dest = substr ($full_url , $p_dest_1, $l);

// Create self-posting form.
if ($url_referer != '') {
    echo '<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body>
    <form action="'.urldecode($url_referer).'" method="post" id="myform">
    <input type="hidden" name="track_web" value="'.urldecode($url_dest).'">
    </form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
} else {
    echo 'Tracking website';
}
?>

And I have my WH site named as index.php in a subdirectory as such:

Code:
<html>
<head>

<?php
if ($_POST['track_web'] != NULL) {
    $offer = urldecode($_POST['track_web']);
    $p1 = strpos ($offer, '?') + 1;
    $url_par = substr ($offer , $p1);
    $paryval = split ('&', $url_par);
    $p = array();
    foreach ($paryval as $value) {
        $p[] = split ('=',$value);
    }
    echo'<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body><form action="'.$offer.'" method="get" id="myform">';
    foreach ($p as $value) {
        echo '<input type="hidden" name="'.$value[0].'" value="'.$value[1].'">';
    }
    echo '</form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
}
?>

</head>
<body>

Website Content

</body>
</html>

I then construct my URL like this:

Code:
http://handler.com?url=http://desired-destination.com&params&referer=http://fakereferer.com/subdomain
I have been working on this FOREVER!

I am using hawkhost not hostgator, so I can't be sure if this could be a mod_rewrite/.htaccess issue. It seems like the people with that problem were getting 404s, not anything to do with being directed to their fake referer instead of their landing page?

Any ideas?
 
Last edited:
EDIT: I got it working! I am so happy! It took me probably 30 hours of messing around with the url formatting and mod_ security and everything but I finally got it working properly :D.

Glad you got it working, BUT, please see my comment further down...

Original message:

CHOPPED FOR BREVITY

And I have my WH site named as index.php in a subdirectory as such:

Code:
<html>
<head>

<?php
if ($_POST['track_web'] != NULL) {
    $offer = urldecode($_POST['track_web']);
    $p1 = strpos ($offer, '?') + 1;
    $url_par = substr ($offer , $p1);
    $paryval = split ('&', $url_par);
    $p = array();
    foreach ($paryval as $value) {
        $p[] = split ('=',$value);
    }
    echo'<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body><form action="'.$offer.'" method="get" id="myform">';
    foreach ($p as $value) {
        echo '<input type="hidden" name="'.$value[0].'" value="'.$value[1].'">';
    }
    echo '</form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
}
?>

</head>
<body>

Website Content

</body>
</html>
CHOPPED AGAIN FOR BREVITY

In the code you place on your WH site (or anywhere you wish to use as a spoofed referer), Percu picked up and edited the code from my OP, and didn't update to include some new code I posted a bit later (props anyway to Percu for a fine job ;)).

The issue with the code above is that if your destination url does NOT have parameters, the script will append some junk to it.

The correct code, modded to comply with Percu's renaming conventions, for the WH site should be:

PHP:
<?php
if ($_POST['track_web'] != NULL) {
    $offer = urldecode($_POST['track_web']);
    $p1 = strpos ($offer, '?') + 1;
    $url_par = substr ($offer , $p1);
    $paryval = split ('&', $url_par);
    $p = array();
    foreach ($paryval as $value) {
        $p[] = split ('=',$value);
    }
    echo'<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body><form action="'.$offer.'" method="get" id="myform">';
    if ($p1 != 1) {
    foreach ($p as $value) {
        echo '<input type="hidden" name="'.$value[0].'" value="'.$value[1].'">';
    }
    }
    echo '</form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
}
?>

The difference is in the
PHP:
if($p1 !=1)
statement, which takes care of offer urls which don't have parameters.

Enjoy!
 
Glad you got it working, BUT, please see my comment further down...



In the code you place on your WH site (or anywhere you wish to use as a spoofed referer), Percu picked up and edited the code from my OP, and didn't update to include some new code I posted a bit later (props anyway to Percu for a fine job ;)).

The issue with the code above is that if your destination url does NOT have parameters, the script will append some junk to it.

The correct code, modded to comply with Percu's renaming conventions, for the WH site should be:

PHP:
<?php
if ($_POST['track_web'] != NULL) {
    $offer = urldecode($_POST['track_web']);
    $p1 = strpos ($offer, '?') + 1;
    $url_par = substr ($offer , $p1);
    $paryval = split ('&', $url_par);
    $p = array();
    foreach ($paryval as $value) {
        $p[] = split ('=',$value);
    }
    echo'<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body><form action="'.$offer.'" method="get" id="myform">';
    if ($p1 != 1) {
    foreach ($p as $value) {
        echo '<input type="hidden" name="'.$value[0].'" value="'.$value[1].'">';
    }
    }
    echo '</form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
}
?>

The difference is in the
PHP:
if($p1 !=1)
statement, which takes care of offer urls which don't have parameters.

Enjoy!

Thanks, I saw that it was neccesary to have parameters so I just added in some junk ones in my testing. I updated my code though, thank you. I could have sworn I read he was using the updated version of your code.

One of the big things that makes a difference in my link, for some reason, is that I must include the full file extensions on my fake referer. I have the file in domain.com/subdomain/index.html so I assumed that domain.com/subdomain would work in my URL, but if I try that with everything else the same I end up going to my fake referer site still... I have to use the full domain.com/subdomain/index.html

This method was a bit touchy to get working the first time, but I agree it is very safe and once it gets set up, from what I can see you can perform this the fake for multiple sites without having to set it up again and again like with double meta redirects and the like, since you just have to edit your handler URL. Probably ideal to spread it around to different handlers, but if your referer is never going to leak I don't see why it's that much of an issue.
 
Thanks, I saw that it was neccesary to have parameters so I just added in some junk ones in my testing. I updated my code though, thank you. I could have sworn I read he was using the updated version of your code.

One of the big things that makes a difference in my link, for some reason, is that I must include the full file extensions on my fake referer. I have the file in domain.com/subdomain/index.html so I assumed that domain.com/subdomain would work in my URL, but if I try that with everything else the same I end up going to my fake referer site still... I have to use the full domain.com/subdomain/index.html

This method was a bit touchy to get working the first time, but I agree it is very safe and once it gets set up, from what I can see you can perform this the fake for multiple sites without having to set it up again and again like with double meta redirects and the like, since you just have to edit your handler URL. Probably ideal to spread it around to different handlers, but if your referer is never going to leak I don't see why it's that much of an issue.

The issue with using domain.com/subdomain instead of domain.com/subdomain/index.html is probably caused by your server not parsing php on html files.
Try to rename index.html to index.php, and then try to use domain.com/subdomain only, and see what happens - it should work fine :)

You really only need one handler, but nothing to stop you using more.
The beauty of this is that, once you paste the 2nd code into a few whitehat sites, which are suitable to be used as referers, you can generate new links in an instant, whenever offers change, as a change in the destination url requires no further setup whatsoever.

However, you'll never get away from the fact that spoofing is more work than blanking, simply due to the fact that you have to do something on your WH pages to make them "believable" as referers (include links or banners to your offers, etc), whereas, with blanking, you get to save yourself that work.
Still, many people feel that, in spite of the extra workload, spoofing is safer - it's horses for courses but, if you're ever tempted to blank instead, check out the other share I made here, as the blanking script is every bit as good as this one :)
 
can you tell me what post and get are on cpa-redirector?
 
can you tell me what post and get are on cpa-redirector?


Sorry, but unless you pose a question which I can understand, you're not going to get an answer.

Furthermore, cpa-r is a different spoofing script altogether.
This is a newer script, completely different, and it offers an either/or scenario, you can't really use both.

If your question relates to cpa-r, I suggest you ask in a thread which covers that script, or ask Brad, as I think he's the coder.
 
So on the fake referrer page (the one where the AMs will see)

as long as I have the offers (whether its a banner, text link, etc), that's all that matters?

even though it looks like a completely worthless site, would the AM's be able to do anything?
 
So on the fake referrer page (the one where the AMs will see)

as long as I have the offers (whether its a banner, text link, etc), that's all that matters?

even though it looks like a completely worthless site, would the AM's be able to do anything?

Do this:

1. Create a simple html page, anywhere, and place your spoofed link, making the destination page the referer.us Test page, so, on this simple page (let's call it simple.html), you will have this code:

HTML:
<html>
<head></head>
<body><br /><br /><center>
<a href="http://handlerdomain.com/?url=http://referer.us/HTTP-Referer-Test.asp?Parameter1=Test+Spoof+Referer&Parameter2=UTF8+%E2%98%85%E2%98%86%E2%98%85%E2%98%86%E2%98%85&Parameter3=Did+Your+See+Five+Stars%3F&referer=http://spoofingsite.com/post-with-ads>TEST SPOOF</a>
</center>
</body>
</html>

2. Place a banner image, or a text link, on your http://spoofingsite.com/post-with-ads page, linked to http://referer.us/HTTP-Referer-Test.asp?Parameter1=Test+Spoof+Referer&Parameter2=UTF8+%E2%98%85%E2%98%86%E2%98%85%E2%98%86%E2%98%85&Parameter3=Did+Your+See+Five+Stars%3F&referer=http://spoofingsite.com/post-with-ads

3. Visit anywhere.com/simple.html and click on the "TEST SPOOF" link

4. Visit http://spoofingsite.com/post-with-ads and click on the linked image, or text link.

Compare the two results, they have to look the same, i.e. end up with the same parameters, on the referer.us test page, with the same referer, etc

This test will ensure that, if AMs check links on the spoofed page, by clicking on the ads, what will be shown on their end as a result of their click will be exactly the same as is shown their end with all your other visitors, so they'll have no way of knowing that your visitors didn't just do the same as they did (i.e. visited the spoofed site and clicked on the ad).

Careful if using Prosper, CLP, etc, and generating dynamic subids, as this could create a difference. I made a separate script, shared in the CLP private buyer's area, which will generate subid's for non-CLP traffic, to remove the difference between CLP traffic and non-CLP traffic when they arrive on the advertiser's page.

HTH
 
☠☠☠Hustle.Hard☠☠☠;3161293 said:
Man I am haveing a problem I tried everything

Going step by step to see if I did something wrong

I put this on my handle domain

Code:
<?php
// Extract URI minus http://handlerdomain.com/
$full_url = urldecode($_SERVER['REQUEST_URI']);
// Extract urls we need
$l = strlen($full_url);
$p_referer = strpos ($full_url, 'referer=');
$p_dest_2 = $p_referer - 1;
$p_referer = strpos ($full_url, '=',$p_referer) + 1;
$url_referer = substr ($full_url , $p_referer);
$p_dest_1 = strpos ($full_url, '=') + 1;
$l = $p_dest_2 - $p_dest_1;
$url_dest = substr ($full_url , $p_dest_1, $l);

// Create self-posting form.
if ($url_referer != '') {
    echo '<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body>
    <form action="'.urldecode($url_referer).'" method="post" id="myform">
    <input type="hidden" name="ref_spoof" value="'.urldecode($url_dest).'">
    </form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
} else {
    echo 'You must provide a referer';
}
?>
and I put this on my second page ( fake refere page ) I put it in the header its a WP. its the second one you posted cause the url has no parameters.

Code:
<?php
if ($_POST['ref_spoof'] != NULL) {
    $offer = urldecode($_POST['ref_spoof']);
    $p1 = strpos ($offer, '?') + 1;
    $url_par = substr ($offer , $p1);
    $paryval = split ('&', $url_par);
    $p = array();
    foreach ($paryval as $value) {
        $p[] = split ('=',$value);
    }
    echo'<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body><form action="'.$offer.'" method="get" id="myform">';
    if ($p1 != 1) {
    foreach ($p as $value) {
        echo '<input type="hidden" name="'.$value[0].'" value="'.$value[1].'">';
    }
    }
    echo '</form><script language="JavaScript"> document.getElementById(\'myform\').submit();</script></body></html>';
}
?>
and my url structure is like this

Code:
http://handler.com/?url=http://whatismyreferer.com/&referer=http://refsite.com/uncategorized/ads/
but it redirect me to this

this is when i put it directly into the browser
Code:
http://dnssearch2.rr.com/index.php?origURL=http%3A//handler.com/%3Furl%3Dhttp%3A//whatismyreferer.com/%26referer%3Dhttp%3A//refsite.com/uncategorized/ads/&r=
this is where i create a link
Code:
http://dnssearch2.rr.com/index.php?origURL=http%3A//handler.com/%3Furl%3Dhttp%3A//whatismyreferer.com/%26referer%3Dhttp%3A//refsite.com/uncategorized/ads/&r=http://site-the-link-is-on.com
This is not a 404 error (or maybe it is im not the smartes coder but ...) but i contacted hostgator to add exception for mod_secruity and they asked me for what domain as I have multiple domain and then they asked where am i seeing the error i didnt know what to say so i just said im going to be testing script blah blah just making sure ahead of time (probably made myself sound dumb with that one huh ) and they told me i first have to get the error and tell them where.


Anyhelp will be nice been trying everything all day read all post in this thread to limit the chance of sounding stupid but im afriad here I am. lol.


PS: my handler, and refsite is all on the same hosting same ip , I doubt thats the issue since i read it okay to host even on the same domain, but just want to give the most info to get this corrected

If your handler domain is http://handler.com, and it is hosted on Hostgator, you need to say to them:

"I need you to add a MOD_Security exception rule to allow me to run a php redirection script on http://handler.com, and enable me to do php redirections via that script".

Let us know when you have it working.
 
hi

i've been using your code since i found this tut without any problems, thanks. the structure i've used was:

handlersite?url=cpaoffer&referer=mysitewithads

have worked fine up till today.

today i tried on a new cpanetwork and when logged in to check stats i saw that most of the referring clicks are referred from

mysitewithads

but there are a few that show as referrer:

mysitewithads,%20handlersite?url=cpaoffer&referer=mysitewithads

from the above referrer cpanetwork will see the actual referrer... how can i solve this?

thanks
 
hi

i've been using your code since i found this tut without any problems, thanks. the structure i've used was:

handlersite?url=cpaoffer&referer=mysitewithads

have worked fine up till today.

today i tried on a new cpanetwork and when logged in to check stats i saw that most of the referring clicks are referred from

mysitewithads

but there are a few that show as referrer:

mysitewithads,%20handlersite?url=cpaoffer&referer=mysitewithads

from the above referrer cpanetwork will see the actual referrer... how can i solve this?

thanks

Yep, occasionally, some sites will track the last two referers, or the handler domain will leak.
For that reason, it's better to use, as your tracking domain, a domain reserved purely for hosting scripts, tracking programs, stats programs, etc, so you can then openly say that it's your tracking domain.

What is MOST important, and is covered by my script, is that the ORIGINAL site the link was clicked on, ALWAYS disappears, as, normally, this is the blackhat site, or the site that breaks the TOS.

You can also tweak the code a bit, to make it appear less obvious. Like, you could change url construction to:

http://handlerdomain.com/?a=OFFERLINK&src=sitewithads

which makes it look like you're tracking the "src", or source of your traffic (this is what whitehat people making money normally do, in fact, an enormous majority of those who make plenty of money are a little obsessive about tracking and analysing to improve their ROI).

Yet other people use the sitewithads (Whitehat site) also as the handler domain so, when the handler leaks, it shows the same site:

http://sitewithads.com/?url=OFFERLINK&referer=sitewithads/post-or-page


Again, the time to worry is when your Blackhat site leaks through. That should never happen, and, with my script and extensive testing, hasn't happened yet...a leak of the handler domain is fine, as long as you have "dressed it up" appropriately.
 
Last edited:
Thank You So Much For this Script. I have been using referer.us for years and this is much better. I have control. Testing it out and 0 Leakage. 0 is a great number. I am not even using this for BH methods just to prevent advertisers from seeing my sources. Great Work!
 
Back
Top