说说php获取Client MAC
摘自: 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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c
