<?php 
  echo '<b>Your ip has now been logged:</b> ';
  echo $_SERVER["REMOTE_ADDR"]; 
$myip = "144.141.53.98"; //so it does not log your IP and spam up the log file
 //echo ' Your ip: '; 
if ( isset($_SERVER["REMOTE_ADDR"]) )    { 
echo '' . $_SERVER["REMOTE_ADDR"] . ' '; 
//echo "You are using Localhost";
} else if ( isset($_SERVER["HTTP_X_FORWARDED_FOR"]) )    { 
  echo '' . $_SERVER["HTTP_X_FORWARDED_FOR"] . ' '; 
//echo "Your ip is forwarded";
} else if ( isset($_SERVER["HTTP_CLIENT_IP"]) )    { 
  echo '' . $_SERVER["HTTP_CLIENT_IP"] . ' '; 
//echo "You ip is not forwarded";
} 
$file = fopen("ips.txt", "a+");
fwrite($file,$_SERVER["REMOTE_ADDR" ]."\n");
?>
Okay now this line of code below
$myip = "144.141.53.98"; //so it does not log your IP and spam up the log file
and I want the if a ip has already been recorded in the log file then it will not record the ip second time
Please help?
 
    