10-08-2009, 12:38 PM
This script when put on a website will write the ips of all visitors and write to log.html, it will create a link to an ip database website. Make sure you have created log.html and that you have set the permisions so it can be writen.
Code:
<?php
$logfile= '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);
?>