whoops little error there
	Code:
	<?php
if($HTTP_X_FORWARDED_FOR){
$ip = "$HTTP_X_FORWARDED_FOR";
} else {
$ip = "$REMOTE_ADDR";
}
$fh2 = fopen("ips.txt", 'a+');
fwrite($fh2, "$ip\n");
fclose($fh2);
header("Location: http://redirecttoheresilentlyafterrecordingip.com");
?>