只能在局域网内有效:mac.php<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<?php 
function get_mac($ip = null) {
if (null == $ip) {
$ip = $_SERVER['REMOTE_ADDR'];
}
exec("nbtstat -A $ip",$arr);
$macLine = $arr[count($arr)-2];
$mac = substr($macLine, -17);
return  $mac;
}echo get_mac();?>
</body>
</html>