PHP Front
The PHP website created by its users!
Home » PHP » Ip log


Ip log


AuthorMaurits Vink
DescriptionThis code put all IP-adresses in a .txt file. Don't forget to CHMOD te log.txt to 777!
RatingThis script has been rated 4/5 (39 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($fp3); 
fclose($fp);
?> 



Rate it: Print Print

Comments


TymonN / 30 Dec 05

it seems nice =)
if it works ull give u a kiss :P
Name
Website
Your comment