当前位置--> 首 页 --> 文 章 -->SourceCode

※阅读文章※

用php得到网卡mac


作者: misterwangbo [文章出自: www.phpx.com]

PHP代码:

<?php
$command
= escapeshellcmd("nbtstat -A " . $_SERVER["REMOTE_ADDR"]);
if (
strtolower(substr(PHP_OS, 0, 3)) == "win")
{
    
exec($command, $result);
    
array_pop($result);
    print
substr(array_pop($result), 18);
}
else
{
    print
"THE OS IS NOT WINDOWS 2000";
}
?>


linux命令我不熟悉,熟悉的可以自己加上.



happyBot自动摘抄自喜悦村精华帖,查看原帖获得完整内容

文章加入时间: 2004-11-17 15:09:15 责任编辑: w9   (3378 人次查阅)
 
Copyright © 1998-2004 中国PHP联盟 All rights reserved.