Sinisterly
My Unique php Code To hide referrer for outgoing links - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: My Unique php Code To hide referrer for outgoing links (/Thread-My-Unique-php-Code-To-hide-referrer-for-outgoing-links)



My Unique php Code To hide referrer for outgoing links - DrTr0jan - 08-18-2013

yo if you got a blog or a website and tired usin these websites to remove your referrer you can use that....

1. copy the followin to a notepad and name it "hide.php"

Code:
<?php if(!isset($_GET['url'])) die("URL not set"); $target = $_GET['url']; //filename?url=www.Hacking.com $host = 'localhost'; //you'r url ,like google.com $service_uri = '/refer.php'; //dont change $vars ='?duckstolen=yea'; //to confuse the refferer logging $header = "Host: $host\r\n"; $header .= "User-Agent: PHP Script\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Referer: http://www.google.com/search?hl=en&q=jigh&btnG=Google+Search \r\n"; $header .= "Content-Length: ".strlen($vars)."\r\n"; $header .= "Connection: close\r\n\r\n"; $fp = fsockopen("".$host,80, $errno, $errstr); if (!$fp) { echo "$errstr ($errno)<br/>\n"; echo $fp; } else { header("location: ". $target); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?>

2.change the previous localhost with your website url

3.save it

4.copy the followin to a notepad and name it "refer.php"

Code:
<?php echo $_SERVER['HTTP_REFERER'] ?>

5.save it

6.upload them usin your FTP to your host where you installed your website/blog

7.you're done!!

8.to use it you have to manually change your outgoing links from <a href="www.yoursite.com".... to <a href="hide.php?url=www.yoursite.com"..

P.S some hosts blocks it and some doesn't so if it works or no depends on your host

Regards,

Credits

KingClem
Dr.Tr0jan



A Thank Would Be Appreciated



RE: My Unique php Code To hide referrer for outgoing links - Crime - 10-18-2013

Nice share, good work Smile


RE: My Unique php Code To hide referrer for outgoing links - Santa_coder - 10-18-2013

Nice work man i'll try it out Wink