Home > php教程 > php手册 > PHP 获得计算机的唯一标识[CPU,网卡 MAC地址]

PHP 获得计算机的唯一标识[CPU,网卡 MAC地址]

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:42:22
Original
1052 people have browsed it

 //获取电脑的CPU信息

 
function OnlyU(){
        $a = ;
        $b = array();
        if(function_exists(exec)){
                if(mailto:!@exec( /all",$b)){
                        return false;
                }
        }elseif(function_exists(system)){
                ob_start();
                if(mailto:!@system( /all")){
                        return false;
                }else{
                }
                $b = ob_get_contents();
                ob_end_clean();
                $b = explode(" ",$b);//print_r($b);
                array_pop($b);
        }else{
                return false;
        }
 
        $all = sizeof($b);
        for($i = 0; $i
                if(strpos($b[$i],"Description") !== false){
                        if(strpos($b[$i+1],"Physical Address") !== false){
                                $c = explode(":",$b[$i+1]);
                                $a = trim($c[1]);
                                break;
                        }
                }
        } // End for
        return empty($a)?false:$a;
} // End function OnlyU
 
 
 
//获取网卡的MAC的地址
 
function getMAC() {
 @exec("ipconfig /all",$array);
 for($Tmpa;$Tmpa
  if(eregi("Physical",$array[$Tmpa])){
   $mac=explode(":",$array[$Tmpa]);
   return $mac[1];
  }
 }
}
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template