|
Before starting you will need to create a new txt file. Leave the file blank and
save it as ips.txt. After that, we goes to the code. This is a good way of
keeping track of your visitors!
$log_file = "ips.txt";
// This is the file to which the IPs are logged in.
$ip = getenv(\'REMOTE_ADDR\');
$fp = fopen("$log_file", "a");
fputs($fp, "$iprn");
flock($fp, 3);
fclose($fp);
PRINT("your IP has been logged.....$ip");
// "your IP has been
logged....." This is what will be displayed on your site. You can change it to say anything you want or you can delete it and leave it blank. $ip is the code that will be displaying the users IP.
?>
|