Ok i don't *THINK* this have already been posted (I did a search), if so forgive me.
--
How to set your own referer?
1) users click on myblackhatdomain.com (directly when e-whoring or from a link on youtube etc, it doesn't matter)
2) code for myblackhatdomain.com (snippet found on BHW)
This also sets a cookie on the client that make the page work his redirection just the first time, useful so that if it's a pay per lead people don't starting using your domain instead of the proper one (this can get you caught).
You can do other things with it (redirect to another affiliate page the second time the page is visited for example) or not using cookies at all.
To delete cookies use only the HTML part of the code.
3) users are redirected to mywhitehatdomain.com (or it can be a page in that domain like mywhitehatdomain.com/offername) sending the referer = http://www.myblackhatdomain.com (or http://www.myblackhatdomain.com/ for Internet explorer)
4) now mywhitehatdomain.com is a legit page that will make your affiliate manager happy, if you go to it without being refered from myblackhatdomain.com you will see the normal page
5) code for mywhitehatdomain.com
6) people are sent to affiliatenetwork.com/youraffiliatelink with your www.mywhitehatdomain.com referer
7) profit.
--
So far works for all browsers with javascript enabled and it ALWAYS change referer to mywhitehatdomain.com WITHOUT having the user to click "click here to continue" (this happens only if he/she doesn't have javascript enabled)
The process lasts a couple of seconds and users can see the urls changing in their url bar. This *doesn't* cloak url bar.
I've tried Firefox 3, 3.5 - IE 6,7,8 and Chrome, on windows and linux.
Of course it's better to set your own referer then just blank it
--
Please spare a thanks if you like.
--
How to set your own referer?
1) users click on myblackhatdomain.com (directly when e-whoring or from a link on youtube etc, it doesn't matter)
2) code for myblackhatdomain.com (snippet found on BHW)
Code:
<?php if (!isset($_COOKIE["rand1"]) || $_COOKIE["rand1"] != "rand2") {
setcookie("rand1", "rand2", time()+3600*24*365);
?>
<html>
<head>
<title>My offer</title>
</head>
<body onload="document.form1.submit();">
<form name="form1" id="form1" method="post" action="http://www.mywhitehatdomain.com/"></form>
<script type="text/javascript">
document.form1.submit();
</script>
<div style="padding: 30px; text-align: center;">
<a href="http://www.mywhitehatdomain.com/">Click here to continue.</a>
</div>
</body>
</html>
<?php } ?>
You can do other things with it (redirect to another affiliate page the second time the page is visited for example) or not using cookies at all.
To delete cookies use only the HTML part of the code.
3) users are redirected to mywhitehatdomain.com (or it can be a page in that domain like mywhitehatdomain.com/offername) sending the referer = http://www.myblackhatdomain.com (or http://www.myblackhatdomain.com/ for Internet explorer)
4) now mywhitehatdomain.com is a legit page that will make your affiliate manager happy, if you go to it without being refered from myblackhatdomain.com you will see the normal page
5) code for mywhitehatdomain.com
Code:
<?php if ( !isset($_SERVER['HTTP_REFERER']) || (($_SERVER['HTTP_REFERER'] != "http://www.myblackhatdomain.com/") && ($_SERVER['HTTP_REFERER'] != "http://www.myblackhatdomain.com")) ) {
?>
here goes the code of your "normal" page (can be a WP blog, your site..anything)
<?php } else { ?>
<html>
<head>
<title>My offer</title>
</head>
<body onload="document.form1.submit();">
<form name="form1" id="form1" method="post" action="http://www.affiliatenetwork.com/youraffiliatelink/"></form>
<script type="text/javascript">
document.form1.submit();
</script>
<div style="padding: 30px; text-align: center;">
<a href="http://www.affiliatenetwork.com/youraffiliatelink/">Click here to continue.</a>
</div>
</body>
</html>
<?php } ?>
7) profit.
--
So far works for all browsers with javascript enabled and it ALWAYS change referer to mywhitehatdomain.com WITHOUT having the user to click "click here to continue" (this happens only if he/she doesn't have javascript enabled)
The process lasts a couple of seconds and users can see the urls changing in their url bar. This *doesn't* cloak url bar.
I've tried Firefox 3, 3.5 - IE 6,7,8 and Chrome, on windows and linux.
Of course it's better to set your own referer then just blank it
--
Please spare a thanks if you like.
Last edited: