This code:
PHP Code:
<?php echo $_SERVER['REMOTE_ADDR']; ?>
would show you on the actually page they vist their IP.
You can use this to log it to a file:
PHP Code:
<?
$IP = $_SERVER['REMOTE_ADDR'];
$DT = date("F j, Y, g:i a")
$IPFile = "IPFile.txt";
$fh = fopen($IPFile, 'w') or die("can't open file");
$stringData = "$IP\n";
fwrite($fh, $stringData);
$stringData = "$DT\n";
fwrite($fh, $stringData);
fclose($fh);
?>
you would have to create the file IPfile.txt first, just a blank file, with permissions 644.
that will just log each time an ip visits showing the ip and the data and time they accessed the site.
And if your really serious about this, I can show you more code to make it work the way you want it to, so they cant cheap, this is the simple basic thing that is middle of what google uses to track.