Berikut script PHP untuk mengambil Mac Address PC atau Laptop:
<?php
ob_start();
system("ipconfig /all"); //Execute external program to display output
$mycom = ob_get_contents(); // Capture the output into a variable
ob_clean();
$findme = "Physical";
$pmac = strpos($mycom, $findme); // Find the position of Physical text
$mac = substr($mycom, ($pmac + 36), 17);
echo $mac;
?>
0 komentar: