ITPub博客

首页 > IT职业 > IT图书 > php的一些有用的自己写的方法

php的一些有用的自己写的方法

IT图书 作者:lgw 时间:2021-09-09 09:19:40 0 删除 编辑

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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-16

  • 博文量
    94
  • 访问量
    628