Hide Original Referrer Script

TheGreyHatter

BANNED
Joined
Mar 31, 2008
Messages
97
Reaction score
50
Here's a script I put together with the help of a buddy on here. It will show the page referrer of the page you want to show a referral from no matter where the traffic is coming from(In case you ever have to prove or send links to a network).

You can send for instance, email traffic to one of your pages that will automatically redirect to the offer and show your good page as the referral. Put up some good content on your "Referral" page and you are all set and the network is happy.

?php

$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

function parse($cadena,$busca){
if($busca=="") return 1;

$vi = split("%",$busca);
$offset=0;
for($n=0;$n<count($vi);$n++){
if($vi[$n]== ""){
if($vi[0]== ""){
$tieneini = 1;
}
} else {
$newoff=strpos($cadena,$vi[$n],$offset);
if($newoff!==false){
if(!$tieneini){
if($offset!=$newoff){
return false;
}
}
if($n==count($vi)-1){
if($vi[$n] != substr($cadena,strlen($cadena)-strlen($vi[$n]), strlen($vi[$n]))){
return false;
}

} else {
$offset = $newoff + strlen($vi[$n]);
}
} else {
return false;
}
}
}
return true;
}


$searchthis = "%email%";

$resp = parse($url,$searchthis);


if ($resp ==1){
header("Location:http://www.yourafiliatelink.com");
} else{

}

?>


Hope this will help some of you out.
 
Forgot to say, make your url like:
http://www.yourlandingpage.com?src=whatever

To determine what you parse

edit: $searchthis = "%whatever%";

In this example whatever would be the string in the url that determines if it goes to the affiliate link or remains on the page.
 
Thanks for sharing this but is it possible to add some comment lines because it isn't completely clear to me.
 
Ok I will explain a little bit more sorry. Just put this code at the top of your page and save your page as a .php file.

The only lines you have to edit are:

$searchthis = "%email%";
// This is the search string that the script looks for to determine if its sent
// to your affiliate link(And passes you page as a referral)
// or if it stays on the current page(To show networks where you referrals
// are coming from)
// and example original url the you would send to the service that will
// provide your traffic is: http://www.yoursite.com?=src=email
// The script will parse out the word email and that tells it that it should
// send the traffic to your affiliate link, but it keeps your landing page
// as the url.

$resp = parse($url,$searchthis);


if ($resp ==1){
header("Location:http://www.yourafiliatelink.com");
// Here all you have to edit is the location of your affiliate link and that
// is where the page will redirect to.
} else{

}

Hope this explains it in a little more detail.

?>
 
Genjutsu,

The script is meant to show the referrer of your landing page if for example your network only allows web traffic and you are sending email traffic to your offer. Its not meant to hide it just to show a referral link from your landing page. Or if the offer allows it, it goes straight to the link you are promoting.
 
So if I dont want my network to see my black hat traffic source I can use this to show that my traffic is coming from my white hat page?
 
I don't quite understand what is trying to be accomplished here. But here is a blog i've found that talks all about this and has developed a way to do this perfectly. I have no tested it so i'm not sure if it works 100%

Will try later....

hxxp://www.slightlyshadyseo.c0m/index.php/controlling-your-referer-and-hiding-your-traffic-sources/
 
Thank you for your script, lee_.

Tell me please, how does the script tell weather it should reveal my landing page ?

What exactly does the $searchthis=%email% string do ?

Tell me please, how should I use the script in the following situation.

I have an active website on domain A.
I have a spammy domain B.
I have an affiliate link pointing to domain C.

I have the script running on domain B. I send email traffic to domain B and the script is set to send it to domain C.

Tell me please, how should I set the script so it would tell the system running on domain C the traffic has come from domain A.
 
I tested this and i don't think it's working.

I think this is how your saying it should work:
Site A.com (click on a link that sends to site B.com)
Site B.com (has code that you provided on it that redirects to site C.com)
Site C.com final site that should have the referral of site B.com

but Site C is showing the referrer as site A.com not B.com

I don't think (with the code you have) that you can send site B as the referrer to site C

Let me know if I'm missing something.

Spag
 
I've been looking for a script just like this. Thanks.
 
I haven't tested it, but if Gen says it doesn't work...
 
I havent tested it, but the only redirect that I see is a php redirect, which doesnt change the referer, and he hasnt responded to my question, so there is no point to debate.

don't think he mean't to do what you are talking about, but rather show a blackhat page on certain referrers, and a white hat when it doesn't match.

but the code is a little bloated in my opinion for something so easy to do.
 
Gen, someone wanting to do that, would be someone getting hold of a good list and trying to drive traffic to a legit WH site? Am I right assuming that you can do this by making the people on the list click on the link in the email, go through 2 meta refreshes and then going to the legit WH site, so it can then redirect to the cpa offer, in order for the network to see the traffic coming from the legit site?

Genjustsu said:
What I think he wanted to do is
Email -> Yoursite.com -> Your affiliate.com | referer = Yoursite.com
 
I have been working on a script that will do the similar thing Gent...thank you because this is MUCH LESS complex than what I was working on
 
Genjutsu is it possible to fake reffer when using your double meta refresh.?
I finally setup Double m refresh right, now i get blank reffer..:)

and i send all BH traffic to subdomains and then double meta refresh to mydomain.com,

IS it possible to make all that BH traffic look like its coming form example, google.com... or somethink, not blank?
 
Back
Top