摘自: amxku.net
一开始我还认为php完全是可以获取到client的mac的,很是荒谬。最后还被云舒鄙视了一番。
这完全不可能的。php是不肯能直接获取到client的mac的。
首先php完全就是在服务端解释执行的,所以没可能直接获取到浏览端的网卡MAC,因为浏览器默认行为是不会把MAC发送出去的。
要是从数据包的角度来解释的话,一般都是在局域网内部传输时才会包上MAC头,经过路由不断转发,实际上每经过一级设备都被剥去一层,到最后就只剩下TCP/IP的数据头和数据了。MAC只可能是在网络底层的物理层中传输。(也就是说client的mac地址信息是不可能在公网上传输的,公网上的MAC信息是最后一跳设备的接口MAC,见Hell-Phantom评论)
从http协议来讲,也是不可能的。http请求中也不可能带上mac地址。可以看看http协议的相关说明。
所以说php是不可能直接获取到client的mac地址的,php要想得到client的MAC地址,得用到第三方的ActiveX或是用js等。PS:html">http://www.kenes.com.cn/MAC.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment