CopyCode The Code is as follows: // obtain the CPU information of the 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
Return empty ($ )? False: $;
} // End function onlyu
// Obtain 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];
}
}
}