Copy Code code as follows:
Get CPU information for your computer
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 ("\ n", $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
Get the MAC address of the NIC
function Getmac () {
@exec ("Ipconfig/all", $array);
for ($Tmpa; $Tmpa <count ($array); $Tmpa + +) {
if (eregi ("Physical", $array [$Tmpa])) {
$mac =explode (":", $array [$Tmpa]);
return $mac [1];
}
}
}