<?php
/*echo exec('getmac');
// echo "<br>";
// echo system('getmac');
// ?>
// <?php
// echo "<br>";
// // $mac = system('arp -an');
// // echo $mac;

$mac='UNKNOWN';
foreach(explode("\n",str_replace(' ','',trim(`WMIC BIOS GET SERIALNUMBER`,"\n"))) as $i)
if(strpos($i,'Tcpip')>-1){$mac=substr($i,0,17);break;}
echo $mac;
*/

// echo "<br>";

// // Turn on output buffering  
// ob_start();  

// //Get the ipconfig details using system commond  
// system('ipconfig /all');  

// // Capture the output into a variable  
// $mycomsys=ob_get_contents();  

// // Clean (erase) the output buffer  
// ob_clean();  

// $find_mac = "Physical"; 
// //find the "Physical" & Find the position of Physical text  

// $pmac = strpos($mycomsys, $find_mac);  
// // Get Physical Address  

// $macaddress=substr($mycomsys,($pmac+36),17);  
// //Display Mac Address  

// echo $macaddress; 
// ?>
<?php
function GetVolumeLabel($drive) {
  // Try to grab the volume name
  if (preg_match('#Volume Serial Number is (.*)\n#i', shell_exec('dir '.$drive.':'), $m)) {
    $volname = ' ('.$m[1].')';
  } else {
    $volname = '';
  }
return $volname;
}
$serial =  str_replace("(","",str_replace(")","",GetVolumeLabel("c")));
echo $serial;




// echo DISKDRIVE GET SerialNumber;
?>

