【发布时间】:2013-03-02 10:55:56
【问题描述】:
使用以下代码获取 mac ID。
<?php
ob_start(); // Turn on output buffering
system('ipconfig /all'); //Execute external program to display output
$mycom=ob_get_contents(); // Capture the output into a variable
ob_clean(); // Clean (erase) the output buffer
$findme = "Physical";
$pmac = strpos($mycom, $findme); // Find the position of Physical text
$mac=substr($mycom,($pmac+36),17); // Get Physical Address
echo $mac;
?>
但它返回服务器机器 MAC ID。我需要获取运行我的网页的 PC 的 MAC ID。
谁能帮帮我
【问题讨论】:
-
你不能,客户端浏览器和网络服务器之间的所有 IP 通信都处于更高级别
标签: php ip client-server