求PHP 网站获取客户端MAC地址的议案
求PHP 网站获取客户端MAC地址的方案
现在有个PHP网站,想获得访问客户的MAC地址,哪位大拿有什么好的解决方案,请告诉小弟,谢谢了。
------解决方案--------------------
………………
这个是不可能的。
你所能获取到的只能是客户端的IP地址、浏览器信息。
MAC地址肯定获取不到,除非你让客户端安控件……
------解决方案--------------------
除非执行段bat或者shell脚本获取
------解决方案--------------------
用exec 执行命令 试试
------解决方案--------------------
让用户自己输入,这是目前最好的办法
------解决方案--------------------
你要有方法了,记得贴出来哦
------解决方案--------------------
define ('EXEC_TMP_DIR', 'C:\WINDOWS\Temp');
function windExec($cmd,$mode=''){
$cmdline = "cmd /C $cmd";
if ($mode=='FG'){
$outputfile = EXEC_TMP_DIR."\\".time() . ".txt";
$cmdline .= " > $outputfile";
$m = true;
}
else $m = false;
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmdline, 0, $m);
if ($outputfile){
$retStr = file_get_contents($outputfile);
unlink($outputfile);
}
else $retStr = "";
return $retStr;
}
echo windExec('ipconfig/all','FG');
这window XP可以,我已经做了测试.在我的机子上面可以..我觉得已改window 都可以,只是temp文件的位置可能不一样
------解决方案--------------------
define ('EXEC_TMP_DIR', 'C:\WINDOWS\Temp');
function windExec($cmd,$mode=''){
$cmdline = "cmd /C $cmd";
if ($mode=='FG'){
$outputfile = EXEC_TMP_DIR."\\".time() . ".txt";
$cmdline .= " > $outputfile";
$m = true;
}
else $m = false;
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmdline, 0, $m);
if ($outputfile){
$retStr = file_get_contents($outputfile);
unlink($outputfile);
}
else $retStr = "";
return $retStr;
}
echo windExec('ipconfig/all','FG');
在我的机子上面可以,估计window都可以,只是要改哈temp文件的位置.
------解决方案--------------------
------解决方案--------------------
------解决方案--------------------
一个方案是 自己实现个服务器的的模块 和一个php模块获取mac
按时按照原理 php一般是cgi fastcgi或者module
所以这个得服务器来做(iis apache 或者ngnix等)
然后这个数据得传给php
所以还得做个php模块接收和处理这个
貌似不简单啊
------解决方案--------------------
这个真的很难哦
------解决方案--------------------
不知道千方百计的获取 MAC 有什么用处?
须知 MAC 是不能跨网的,即只要穿过路由器就无效了
------解决方案--------------------

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



How to view all IP addresses on the LAN using cmd: 1. Press the "Win+R" shortcut key to open the "Run" window; 2. After entering "CMD" in the "Run" window, press the Enter key; 3. In the open "Command" In the "Prompt" interface, enter the command "arp -a" and press the Enter key; 4. From the returned results, you can see the IP addresses of all computers in the local LAN that communicate with the machine.

This guide will explain how to obtain a BitLocker recovery key to restore access to encrypted data if necessary. BitLocker is a security feature of Windows devices used to protect data from unauthorized access. Recovery keys are a backup method if you can't access your data through regular means. You can obtain a 48-digit BitLocker recovery key without a Microsoft account or via CMD, ensuring you are always able to access and recover your important data. How to get BitLocker recovery key from CMD without Microsoft account? Follow these suggestions to obtain a BitLocker recovery key: Using Command Prompt click Start, search for cmd and click to manage

The command to use CMD to close a port: 1. Use CMD to close a specific port; 2. Use CMD to close all open ports; 3. Use CMD to open a specific port; 4. Use CMD to open all open ports.

Many friends encounter certain software getting stuck when using their computers. If the computer cannot move, you need to call up the task manager to end the process. So how to use cmd to open the task manager command? Just enter tasksmgr and press enter. The specific solutions are discussed below. Take a look. Steps to use cmd to open the Task Manager command: 1. Press and hold the Win+R keys on the keyboard to open the run window, or click "Start - Run" in the lower left corner, enter cmd in the run window, and press the Enter key to open the cmd window. 2. Enter: C:\Windows\system32\taskmgr.exe, and then press the Enter key to open the task manager. 3. Open CMD

Enter the following command in the administrator command prompt to turn off manage-bde-offC: But sometimes the following prompt appears: Error - This volume stores one or more external keys that can automatically unlock other volumes. This type of key must first be deleted before this volume can be unlocked. At this time, you need to execute the following command first: (If the system partition is not C, change the drive letter below) manage-bde-autounlock-ClearAllKeysc: Error 2: This operation cannot be performed because the volume is locked. manage-bde-unlockc:-rp123456789012345678901234567890123456789012345678 Note:

Differences: 1. When running Cmd, it only takes up less than 1M of memory; when using PowerShell, it takes up about 20M of memory. 2. Cmd does not support syntax highlighting, but PowerShell does. 3. When using Cmd to run some more complex and time-consuming commands, when you drag the command line window at will, the content in the window can still remain the same; but PowerShell cannot. 4. Cmd can only use commands in the .net library, nor can it use Linux commands; PowerShell can.

The cmd window prompts that telnet is not an internal or external command. This problem must have deeply troubled you. This problem does not appear because there is anything wrong with the user's operation. Users do not need to worry too much. All it takes is a few small steps. Operation settings can solve the problem of cmd window prompting telnet is not an internal or external command. Let’s take a look at the solution to the cmd window prompting telnet is not an internal or external command brought by the editor today. The cmd window prompts that telnet is not an internal or external command. Solution: 1. Open the computer's control panel. 2. Find programs and functions. 3. Find Turn Windows features on or off on the left. 4. Find “telnet client

Solution to cmd php garbled characters: 1. In cmd or shellpower on the Windows platform, execute the php script and check whether it is garbled; 2. Modify the current page number characters by executing the "exec("CHCP 65001");" command in the php script Just set.
