PHP获得计算机的唯一标识[CPU,网卡MAC地址]_PHP教程
时间:2021-07-01 10:21:17
帮助过:4人阅读
//获取电脑的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 < $all; $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
http://www.bkjia.com/PHPjc/478809.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478809.htmlTechArticle//获取电脑的CPU信息 function OnlyU(){ $a = ; $b = array(); if(function_exists(exec)){ if(mailto:!@exec( /all",$b)){ return false; } }elseif(function_exists(system)){ ob_star...