|How it works|
For this example we will assume that someone has logged onto your site with the username shavenferret and the IP address 184.108.40.206.
The script is called by a server side include somewhere in a page that everyone who logs onto your site will see. If you have many "main pages", that's okay, you can call the script with each one without screwing anything up.
The script gets the username (shavenferret) and the IP (220.127.116.11).
The script chops off .67.89 (the last two parts of the IP address). This is done because the last part of many people's IP address changes every time they get on the internet.
The script opens a text file containing the first 2 parts of every IP shavenferret has ever used. It checks if shavenferret has ever used 123.45.***.***.