Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php ip log

$logfile= 'log.txt';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>';

$fp = fopen($logfile, "r+");

fwrite($fp, $logdetails, strlen($logdetails));
fclose($fp);
 
PREVIOUS NEXT
Tagged: #php #ip #log
ADD COMMENT
Topic
Name
3+3 =