How it works For this example we will assume that someone has logged onto your site with the username shavenferret and the IP address 123.45.67.89. | ||||
Step 1: 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. | ||||
Step 2: The script gets the username (shavenferret) and the IP (123.45.67.89). | ||||
Step 3: 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. | ||||
Step 4: 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.***.***. | ||||
Step 5:
| ||||
Step 6:
|