Identifies the device MAC address of the requesting site and feeds it back to the user using a random code calculated by the MAC address

Source: Internet
Author: User
For each request site of the device terminal, get its MAC address (or IP line), and then use the algorithm f (MAC) = verification Code p, return p to the device Terminal page, the user input the verification code p, as a sign-in!
The principle is so, how can I do it?
Ask experienced, thought-minded it peers to help

Reply content:

For each request site of the device terminal, get its MAC address (or IP line), and then use the algorithm f (MAC) = verification Code p, return p to the device Terminal page, the user input the verification code p, as a sign-in!
The principle is so, how can I do it?
Ask experienced, thought-minded it peers to help

First, there is no way to get the client Mac address on the Web server without installing the plugin on the client side.
And with IP words, 截至到2013年6月底,全球IPv4地址分配总数共计 3,504,465,208个 (from the network). If you need to verify that the code is completely non-repeatable, at least 10 bits, that is not as good as the direct use of IP as a verification code.
Therefore, a more feasible solution is to put the verification code and IP corresponding relationship with the database or other means of storage. If the generated verification code repeats, then another one. So the specific algorithm is very arbitrary, for example, with MD5, and then take a first few converted to an integer type.

  • 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.