How to bind an IP address to an account

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.