PHP获取网卡地址

PHP代码
  1. @exec(“ipconfig /all”,$array);   
  2. for($Tmpa;$Tmpa<count($array);$Tmpa++){   
  3.     if(eregi(“Physical”,$array[$Tmpa])){   
  4.         $getstr=explode(“:”,$array[$Tmpa]);   
  5.         echo $getstr[1];   
  6.     }   
  7. }   
  8.   
  9. ?>  
]]>