|
Ip log
| Author | Maurits Vink |
| Description | This code put all IP-adresses in a .txt file. Don't forget to CHMOD te log.txt to 777! |
| Rating | (31 votes) |
PHP Code
<?
$log_file = "log.txt";
$ip = $REMOTE_ADDR;
$page = $_SERVER['REQUEST_URI'];
$host = gethostbyaddr($REMOTE_ADDR);
$date_time = date('d-m-Y/H:i:s');
$fp = fopen("$log_file", "a");
fputs ($fp,"
($date_time) $ip ($host) $page
");
flock($fp, 3);
fclose($fp);
?>
Comments
it seems nice =)
if it works ull give u a kiss :P
|