Just make a script that stores the IP address in a database (I think the variable storing the IP's something like $_SERVER['HTTP_REMOTE_ADDR']), then link to that script in each page through an image tag (<img src="ipgrab.php" width="1" height="1" />)