Talk about how php gets Client MAC

Source: Internet
Author: User

From: amxku.net

At first, I thought that php could completely obtain the mac of the client, which is ridiculous. Finally, it was despised by yunshu.

This is totally impossible. Php cannot directly obtain the mac of the client.

First, php is completely interpreted and executed on the server, so it is impossible to directly obtain the MAC address of the browser Nic, because the browser does not send MAC by default.

If it is explained from the perspective of data packets, MAC headers are usually included during transmission within the LAN, and the routes are constantly forwarded. In fact, each level-1 device is stripped from a layer, at the end, only the TCP/IP data header and data are left. MAC can only be transmitted in the physical layer of the network. (That is to say, the client's mac address information cannot be transmitted on the public network. The public network's MAC information is the last hop device's interface MAC. See Hell-Phantom's comment)

The http protocol is also impossible. Mac addresses cannot be included in http requests. Let's take a look at the instructions on the http protocol.

Therefore, php cannot directly obtain the mac address of the client. To obtain the MAC address of the client, php must use a third-party ActiveX or js. PS: html "> http://www.kenes.com.cn/MAC.html


 

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.