I want to find the MAC address of my client, for my website based on PHP. Currently I am using the code provided to fetch the mac address on a linux OS. I want to know will this method work on any linux distro , and if not, then how can I fetch the MAC address for any OS. Also is there anything that works on any OS, wether linux or windows or mac.
$mac_linux = shell_exec('cat /sys/class/net/*/address');
$mac = trim($mac_linux);
$data = preg_split('/\s+/', $mac);
$mac1 = $data[0];
$mac2 = $data[1];
$mac3 = $data[2];