top of page

HOW TO HIDE YOUR HTTP REFERRER FOR FREE

 

To have an  Anonymous http referrer

 

Just Replace http://autoblog.nolimithost.tk with your own sites URL

Code:

<?php // Extract URI minus http://autoblog.nolimithost.tk $req_url = $_SERVER['REQUEST_URI']; function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); } $full_url = selfURL(); // Extract the urls which we need $script_name = $_SERVER['SCRIPT_NAME']; $current_file = basename(__FILE__); $dir = str_replace($current_file,'',$script_name); $dir .= '?'; $offer = str_replace($dir,'',$req_url); $offer = remove_attempt($offer); $fallback = 'http://www.google.com/'; if (!isset($_REQUEST['attempt'])) $_REQUEST['attempt'] = 0; switch ($_REQUEST['attempt']) { case 0: echo method0($offer,$full_url); break; case 1: echo method1($offer,$full_url); break; case 2: echo method2($offer,$full_url); break; case 3: echo method3($offer,$fallback); break; default: echo method0($offer,$full_url); } function method0($offer,$full_url) { $txt = ''; $referer = ''; if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER']; if ($referer == '' ) { // If blank redirect header('Location: '.$offer); } else { // Use method 0 to blank -> works mostly for IE and FF $txt = '<meta http-equiv="refresh" content="0; url='.$full_url.'&attempt=1">'; } return $txt; } function method1($offer,$full_url) { $txt = ''; $referer = ''; if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER']; if ($referer == '' ) { // If blank redirect header('Location: '.$offer); } else { // Use method 1 to blank $txt = '<script> function go(){ window.frames[0].document.body.innerHTML=\'<form target="_parent" method="post" action="'.$full_url.'&attempt=2">'; $txt .= '</form>\'; window.frames[0].document.forms[0].submit() } </script> <iframe onload="window.setTimeout(\'go()\', 99)" src="about:blank" style="visibility:hidden"></iframe>'; } return $txt; } function method2($offer,$full_url) { $txt = ''; $referer = ''; if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER']; if ($referer == '' ) { // If blank redirect header('Location: '.$offer); } else { // Use method 2 to blank $txt = '<iframe src="javascript:parent.location=\''.$full_url.'&attempt=3\'" style="visibility:hidden"></iframe>'; } return $txt; } function method3($offer,$fallback) { // All methods tried $referer = ''; if (isset($_SERVER['HTTP_REFERER'])) $referer = $_SERVER['HTTP_REFERER']; if ($referer == '' ) { // If blank redirect header('Location: '.$offer); } else { // No methods remaining -> send to fallback header('Location: '.$fallback); } return $txt; } function remove_attempt($url) { $i = strpos($url,'&attempt='); if ($i > 0 ) $url = substr($url,0,$i); return $url; } function create_parameters($url) { $p1 = strpos ($url, '?'); $p = array(); if ($p1 > 0 ) { $url_no_par = substr ($url , 0, $p1); $p1 = $p1 + 1; $url_par = substr ($url , $p1); $paryval = explode ('&', $url_par); foreach ($paryval as $value) { $p[] = explode ('=',$value); } } return $p; } ?>

 

PROS and CONS of hiding your http referrer

PROS 1]You can send anonamous traffic to your site

           2]You can charge others for your service

             3]You may hide unlimited http address

CONS 1]Some browsers may not support your script

             2]Firewalls may block your script

_________________________

Then you should try pitlabs
 

Do you want to sell website views, youtube views or any other virtual product but don't know where to sell these products or you just want affiliates for your company

Are you a software reseller strugling to sell a single product

Are you good at writing articles

 

bottom of page