how would a write a script that will log ip addresses on to a txt or something if they visit a certain page?
how would a write a script that will log ip addresses on to a txt or something if they visit a certain page?
A simple Google of "IP Logger in PHP" gave me this PHP code.
[PHP]<?php
$logfile= '/full_path_to/log.html';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
?>[/PHP]
aight thanks!