PHP获取网卡地址的代码

时间:2022-09-16 18:41:03

代码如下:


<?php     
@exec("ipconfig /all",$array);     
for($Tmpa;$Tmpa<count($array);$Tmpa++){     
    if(eregi("Physical",$array[$Tmpa])){     
        $getstr=explode(":",$array[$Tmpa]);     
        echo $getstr[1];     
    }     
}     

?>