phpfail
Regular Member
- Aug 21, 2011
- 236
- 107
If anyone is in need of a fake referrer script, can be used for almost anything apart from iframes as it replaces the URL bar here is one that I knocked up earlier for a new site that I am designing:
Let me know if this helped you please!
Code:
[LEFT][COLOR=#0000BB][FONT=monospace]<?php
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// Add this code to the very top of the file that you would like to be the fake referrer and then link to this file like this:
// http://yoursite.com/file.php?goto=111 (Where 111 = the number below).
// Change the number below to any number you want, affiliate networks may hook onto the 111 so it would be best to change.
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$num [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"111"[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// Change the below link to your affiliate link.
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$url [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"http://affiliatelink.com"[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// Change the below if you want to block by referring URL
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$allowed_referrer [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"google.com"[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// Do not edit below
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$doit[/FONT][/COLOR][COLOR=#007700][FONT=monospace]=[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]true[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
if([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$allowed_referrer[/FONT][/COLOR][COLOR=#007700][FONT=monospace]!=[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]""[/FONT][/COLOR][COLOR=#007700][FONT=monospace]){
if(![/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]strstr[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_SERVER[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'HTTP_REFERER'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]],[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$allowed_referrer[/FONT][/COLOR][COLOR=#007700][FONT=monospace])){
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$doit[/FONT][/COLOR][COLOR=#007700][FONT=monospace]=[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]false[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
}
}
if([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$doit[/FONT][/COLOR][COLOR=#007700][FONT=monospace]==[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]true[/FONT][/COLOR][COLOR=#007700][FONT=monospace]){
if (isset([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_GET[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'goto'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]]) && [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_GET[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'goto'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]]==[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$num[/FONT][/COLOR][COLOR=#007700][FONT=monospace]){
echo [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"<html><head></head><body><form action=\""[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"http://"[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_SERVER[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'HTTP_HOST'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_SERVER[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'PHP_SELF'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]].[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"\" method=\"post\" id=\"linkrefer\"><input type=\"hidden\" name=\"num\" value=\""[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$num[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"\" /></form><script language=\"JavaScript\">document.getElementById(\"linkrefer\").submit();</script></body></html>"[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
return [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]true[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
exit();
}
if (isset([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_POST[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'num'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]]) && [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$_POST[/FONT][/COLOR][COLOR=#007700][FONT=monospace][[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'num'[/FONT][/COLOR][COLOR=#007700][FONT=monospace]]==[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$num[/FONT][/COLOR][COLOR=#007700][FONT=monospace]){
echo [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"<script>window.location.replace(\"[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$url[/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]\")</script>)"[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
}
}
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// White Hat Page Goes Below
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR][/LEFT]
Let me know if this helped you please!
Last edited: