TheGreyHatter
BANNED
- Mar 31, 2008
- 97
- 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.
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.