JohnsonDaniel
Regular Member
- May 16, 2008
- 389
- 1,398
This is an update to this thread, posted in 2011:
[TUT and CODE]★★★ How to Fake your Referer, Fake Referer Any Offer, Fake Referrer Script
In that thread there were two issues:
1. Some of the code resulted in junk being appended to the link if there were no parameters used.
The code was then updated to fix that, on the 2nd page, but, so many posts on, it's hard to find.
2. The code used the split() function, which has since been deprecated in more recent PHP versions.
Unless PHP error warnings were set to "OFF" via php.ini or .htaccess, this deprecated function caused warnings
to be displayed.
What THIS thread contains is a copy-paste of the details and explanations from the previous thread,
but with updated code, which
corrects the two issues explained above.
Here is a script I made for Content Lock Pro buyers which will provide Fake Referer functionality.
I have decided to share with BHW for free - awesome for when you don't quite have
the <cough> right <cough> type of traffic
It will allow you to fake http referer when sending traffic.
Spoof referer, fake http refer, fake referrer, they can all be done.
We all know the value of a decent solution, and this one works in all
browsers tested so far.
Reports on further test results are welcomed in this thread.
The requirement:
Transfer, including any parameters (even dynamically generated) to a
destination link, whilst replacing the original referer info in the surfer's
browser to a new referer of our choice.
Self-host the script which will handle the transfer.
If the script is hosted on
construct fake referer urls like:
Steps to Make this work for you:
1. Save the following code as index.php and upload to the domain of your choice. The domain will "handle" the redirections, and will not be seen:
2. Insert the following code in any page (must either be a php page, or an
html page on a server which will execute php code within html files), any
WP page or post, or, if wanting to be able to use "any" post on your WP
blog as your referer, insert it in the WP header.php file (this will even permit
a fake referer to be a post which doesn't actually exist):
3. Usage:
Say, for example, you upload the first file, as index.php, to handler.com,
and you place the second code in a Wordpress Header.php, on myfavewpsite.com, which, say,
has a post like: myfavewpsite.com/post-with-ads.
Now, you want to send your visitors to this offer link:
http://myCPAnetwork.com?oid=12345&pid=6789&sid=yy7456
The link you would post or display or send your visitors to would be:
As mentioned above, tests are welcomed, but please, if using or testing, post observed results, and
leaks, if any (there shouldn't be, ever) in this thread.
Also, this will not work to use ASP-based pages as the fake referer, the page must be able to interpret php
code (most servers do).
Finally, if you end up on a 403-Forbidden page, you need to ask your host to add an exception rule to MOD_Security to allow PHP redirections.
Feel free to check other threads started by me to find my other shares:
1. Content Locking Methods to make $$$ per day:
a) [METHOD Step-by-Step with CODE] My Twisted Method to $1k+ a week - NOOB friendly
b) My Twist to Content Locking for $80 a day
2. Yourls Plugin, Shorten a Url, Iframe the Destination, and Execute Code (locker or other code):
a) [SCRIPT] Shortener with iFrame and any code you like - Gauging interest, will release free
b) [GET] Plugin - Url Shortener - Create Iframe Of Long Url - Lock It Or Call Any Code
3. Use your US-based VPS as a secure VPN for your private use.
[METHOD] Got Server/VPS? Need an IP? Private VPN on your Server
4. Send postbacks from your OWN thank-you page to any postback script or
url (thank-you for completing offer, for submitting email, whatever):
[SHARE] Set up postbacks for conversion tracking. No Tracking = No Money!
ENJOY!
If you like my stuff, please post on the threads with your thoughts, your mods, your methods or your spins.
Please - no PMs, keep questions to the relevant threads.
[TUT and CODE]★★★ How to Fake your Referer, Fake Referer Any Offer, Fake Referrer Script
In that thread there were two issues:
1. Some of the code resulted in junk being appended to the link if there were no parameters used.
The code was then updated to fix that, on the 2nd page, but, so many posts on, it's hard to find.
2. The code used the split() function, which has since been deprecated in more recent PHP versions.
Unless PHP error warnings were set to "OFF" via php.ini or .htaccess, this deprecated function caused warnings
to be displayed.
What THIS thread contains is a copy-paste of the details and explanations from the previous thread,
but with updated code, which
corrects the two issues explained above.
Here is a script I made for Content Lock Pro buyers which will provide Fake Referer functionality.
I have decided to share with BHW for free - awesome for when you don't quite have
the <cough> right <cough> type of traffic
It will allow you to fake http referer when sending traffic.
Spoof referer, fake http refer, fake referrer, they can all be done.
We all know the value of a decent solution, and this one works in all
browsers tested so far.
Reports on further test results are welcomed in this thread.
The requirement:
Transfer, including any parameters (even dynamically generated) to a
destination link, whilst replacing the original referer info in the surfer's
browser to a new referer of our choice.
Self-host the script which will handle the transfer.
If the script is hosted on
HTML:
http://handler.com
HTML:
http://handler.com/?url=http://DestUrlIncludingParameters&referer=http://FakeRefUrl
1. Save the following code as index.php and upload to the domain of your choice. The domain will "handle" the redirections, and will not be seen:
PHP:
<?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';
}
?>
html page on a server which will execute php code within html files), any
WP page or post, or, if wanting to be able to use "any" post on your WP
blog as your referer, insert it in the WP header.php file (this will even permit
a fake referer to be a post which doesn't actually exist):
PHP:
<?php
if ($_POST['ref_spoof'] != NULL) {
$offer = urldecode($_POST['ref_spoof']);
$p1 = strpos ($offer, '?') + 1;
$url_par = substr ($offer , $p1);
$paryval = explode ('&', $url_par);
$p = array();
foreach ($paryval as $value) {
$p[] = explode ('=',$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>';
}
?>
Say, for example, you upload the first file, as index.php, to handler.com,
and you place the second code in a Wordpress Header.php, on myfavewpsite.com, which, say,
has a post like: myfavewpsite.com/post-with-ads.
Now, you want to send your visitors to this offer link:
http://myCPAnetwork.com?oid=12345&pid=6789&sid=yy7456
The link you would post or display or send your visitors to would be:
HTML:
http://handler.com/?url=http://myCPAnetwork.com?oid=12345&pid=6789&sid=yy7456&referer=http://myfavewpsite.com/post-with-ads
leaks, if any (there shouldn't be, ever) in this thread.
Also, this will not work to use ASP-based pages as the fake referer, the page must be able to interpret php
code (most servers do).
Finally, if you end up on a 403-Forbidden page, you need to ask your host to add an exception rule to MOD_Security to allow PHP redirections.
Feel free to check other threads started by me to find my other shares:
1. Content Locking Methods to make $$$ per day:
a) [METHOD Step-by-Step with CODE] My Twisted Method to $1k+ a week - NOOB friendly
b) My Twist to Content Locking for $80 a day
2. Yourls Plugin, Shorten a Url, Iframe the Destination, and Execute Code (locker or other code):
a) [SCRIPT] Shortener with iFrame and any code you like - Gauging interest, will release free
b) [GET] Plugin - Url Shortener - Create Iframe Of Long Url - Lock It Or Call Any Code
3. Use your US-based VPS as a secure VPN for your private use.
[METHOD] Got Server/VPS? Need an IP? Private VPN on your Server
4. Send postbacks from your OWN thank-you page to any postback script or
url (thank-you for completing offer, for submitting email, whatever):
[SHARE] Set up postbacks for conversion tracking. No Tracking = No Money!
ENJOY!
If you like my stuff, please post on the threads with your thoughts, your mods, your methods or your spins.
Please - no PMs, keep questions to the relevant threads.