script to find mac id of pc which runs apache using php

This script display the mac id of PC which is hosted the APACHE server and not the client pc who is accessing.

 

ob_start();

system(“ipconfig /all”);

 $cominfo=ob_get_contents();

ob_clean();

$search = “Physical”;

$primarymac = strpos($cominfo, $search);

$mac=substr($cominfo,($primarymac+36),17);//MAC Address

echo $mac;

?>

.