首页 > IT职业 > IT图书 > php的一些有用的自己写的方法
function getMac()
{
$ip = $_SERVER["REMOTE_ADDR"];
$command = "arp";
$data = exec($command,$out);
$ipstr= "";
for ($i=0;$i { if(strpos($out[$i],$ip) === 0) { $ipstr = $out[$i]; } } if($ipstr != "") { $strs = my_split($ipstr," "); return $strs[2]; } }
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2751/viewspace-2809486/ ,如需转载,请注明出处,否则将追究法律责任。