Home > Backend Development > PHP Tutorial > Talk about php getting Client MAC_PHP tutorial

Talk about php getting Client MAC_PHP tutorial

WBOY
Release: 2016-07-13 17:33:58
Original
1125 people have browsed it

Excerpted from: amxku.net

At first, I thought that php could completely obtain the client’s mac, which was ridiculous. In the end, he was despised by Yun Shu.

This is completely impossible. PHP is not willing to directly obtain the client's mac.

First of all, PHP is completely interpreted and executed on the server side, so it is impossible to directly obtain the MAC of the network card on the browser side, because the default behavior of the browser is not to send the MAC.

If we explain it from the perspective of data packets, the MAC header is usually included when transmitting within the LAN, and is continuously forwarded through routing. In fact, each layer of equipment is stripped off, and in the end it is Only the TCP/IP header and data are left. MAC can only be transmitted in the physical layer at the bottom of the network. (That is to say, the client’s mac address information cannot be transmitted on the public network. The MAC information on the public network is the interface MAC of the last hop device. See Hell-Phantom’s comment)

From the perspective of http protocol, it is also impossible. It is also impossible to bring the mac address in the http request. You can take a look at the relevant instructions of the http protocol.

So it is impossible for php to directly obtain the client's MAC address. If php wants to obtain the client's MAC address, it must use third-party ActiveX or js, etc. PS: html">http://www.kenes.com.cn/MAC.html


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508522.htmlTechArticleExcerpted from: amxku.net At first, I thought that php could completely get the client’s mac, which was ridiculous. . In the end, he was despised by Yun Shu. This is completely impossible. php is not willing to be directly obtained...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template