How to bind an IP address to an account
The web system binds an IP address to the logon account.
I use $ _ SERVER ['remote _ ADDR '] to obtain the client IP address and compare it with the IP address in the database. All of a sudden, it's okay in a LAN, but remote login to the server may not work. I wonder if there are any good methods?
How does php identify whether it has logged on to the current computer? What identifier can be obtained to identify the current computer?
Reply to discussion (solution)
JavaScript works together, but it is not perfect ....
Cookie
The ip address will change. if you bind a Nic and a hardware serial number, you can.
The web system binds an IP address to the logon account.
I use $ _ SERVER ['remote _ ADDR '] to obtain the client IP address and compare it with the IP address in the database. All of a sudden, it's okay in a LAN, but remote login to the server may not work. I wonder if there are any good methods?
How does php identify whether it has logged on to the current computer? What identifier can be obtained to identify the current computer?
If the IP address is fixed, how does $ _ SERVER ['remote _ ADDR '] obtain the IP address? What is the IP address obtained from the internet when the local network of the server obtains 192.168.1.xxx?