I made this little script to make fake referer simple. Name the file "fakereferer.php" and copy paste this script into the file:
On your white hat site, put this at the top of the php page (after the "<?php" line) that will be used as the fake referer
So if my white hat url is http://mywhitesite.com/index.php and i want to redirect a link through it, i would do this:
"http://mywhitesite.com/index.php?l=http%3A%2F%2Fgoogle.com%2F"
This will redirect me to http://google.com/ and make the referer "http://mywhitesite.com/index.php" (it removes the ?l=blahblah) part.
NOTE: The part after "?l=" must be encoded using this: http://meyerweb.com/eric/tools/dencoder/
So, if i was using Content Locker Pro, and i want to add an offer...let's say the url to the offer is http://admedia.com/?offerid=3747 then in CLP i would make the URL of the offer "http://mywhitesite.com/index.php?l=http%3A%2F%2Fadmedia.com%2F%3Fofferid%3D3747". When a user clicks this URL, it will appear as the traffic is coming from "http://mywhitesite.com/index.php"
If you don't add "?l=blahblah" it will just show the normal white hat site
Code:
<?php
function removeqsvar($url, $varname) {
return preg_replace('/([?&])'.$varname.'=[^&]+(&|$)/','$1',$url);
}
if(isset($_GET["l"]))
{
$url = $_GET["l"];
setcookie("redirect", $url);
$newRequest = removeqsvar($_SERVER["REQUEST_URI"], "l");
if(substr($newRequest, -1) == "?") {
$newRequest = substr($newRequest, 0, strlen($newRequest) - 1);
}
$redirectUrl = "http://" . $_SERVER["SERVER_NAME"] . $newRequest;
header("location: $redirectUrl");
exit();
} else if(isset($_COOKIE["redirect"]))
{
$url = $_COOKIE["redirect"];
setcookie("redirect", "");
echo "<script>window.location.replace(\"$url\")</script>";
exit();
}
?>
On your white hat site, put this at the top of the php page (after the "<?php" line) that will be used as the fake referer
Code:
include("fakereferer.php");
So if my white hat url is http://mywhitesite.com/index.php and i want to redirect a link through it, i would do this:
"http://mywhitesite.com/index.php?l=http%3A%2F%2Fgoogle.com%2F"
This will redirect me to http://google.com/ and make the referer "http://mywhitesite.com/index.php" (it removes the ?l=blahblah) part.
NOTE: The part after "?l=" must be encoded using this: http://meyerweb.com/eric/tools/dencoder/
So, if i was using Content Locker Pro, and i want to add an offer...let's say the url to the offer is http://admedia.com/?offerid=3747 then in CLP i would make the URL of the offer "http://mywhitesite.com/index.php?l=http%3A%2F%2Fadmedia.com%2F%3Fofferid%3D3747". When a user clicks this URL, it will appear as the traffic is coming from "http://mywhitesite.com/index.php"
If you don't add "?l=blahblah" it will just show the normal white hat site
Last edited: