Test referrer?

danchoksy

BANNED
Joined
Sep 17, 2008
Messages
152
Reaction score
29
how can you test if the referrer/blanked/etc is setup correctly? is ther a script that will show you the referring url?
 
Put this in a blank note pad file and save it as referrer.php or anything you wish and point your traffic towards it. I would suggest testing it out with crap traffic first, all browsers are set up differently and I managed to get a few leaked referrers although I could have prevented it, lost me over $2500. So check and double check!

Code:
<?php
$myFile = "./data.txt";
	$fh = fopen($myFile, 'a') or die("can't open file");
	fwrite($fh,"nReferer: ");
	fwrite($fh, ($_SERVER['HTTP_REFERER']) );
	fwrite($fh,", ");
	fwrite($fh, ($_SERVER['HTTP_USER_AGENT']) );
	fwrite($fh,", ");
	fwrite($fh, $_SERVER['REMOTE_ADDR']);
	fwrite($fh,", ");
	fwrite($fh, date('l jS of F Y h:i:s A') );
	fclose($fh);
?>


Then point you browser to ./data.txt to see the results.
 
Why dont you just but the affiliate as one of the website that you have setup. Then check the log and you you have a referer from your IP address but it will be blank.
 
no i actually testing something.. i want it to SHOW referrer..

Put this into test.php:
PHP:
 <?php echo $_SERVER['HTTP_REFERER']; ?>

You'll want to test whatever cloaking method you're using with as many different browsers as you can, because some handle referers differently than others. IE is notorious for mishandling referers.
 
Back
Top