Previous IP saving
#4

Most people have DHCP, so their IP can change at any moment based on needs/rules from their ISP.
So your player can also have a different IP every time he logs in, so just having 2 fields would be a bit limited.

You can also make a separate table and add a new entry every time they connect.
You could save the player's ID, login-time and IP at that time.
Then you can track all the IP addresses he ever used and you even see when he used which IP and when he connected to your server.
It will also be very easy to see if his IP is suddenly completely different (other country for example), that could easily be used as evidence that his account has been hacked by someone else.

Then you don't need to check if IP's have changed and update one or both fields based on the check.

I have an auto-login system on my script, which uses the last used IP.
You can always update that IP in his account everytime he connects too, but load it first.
Then you can compare that last IP with the current IP and if they're the same, login the player without the need to enter a password.
Reply


Messages In This Thread
Previous IP saving - by yvoms - 11.01.2016, 20:35
Re: Previous IP saving - by itsCody - 11.01.2016, 20:47
Re: Previous IP saving - by yvoms - 11.01.2016, 21:29
Re: Previous IP saving - by AmigaBlizzard - 11.01.2016, 21:51
Re: Previous IP saving - by justice96 - 11.01.2016, 22:27
Re: Previous IP saving - by yvoms - 12.01.2016, 09:28

Forum Jump:


Users browsing this thread: 2 Guest(s)