Archive

Posts Tagged ‘PHP’

How to get client MAC address in PHP

July 4th, 2009
<?php
exec('arp '.$_SERVER['REMOTE_ADDR'],$user_mac);
echo substr($user_mac[1],strpos($user_mac[1],':')-2, '17');
?>

Note : this technique only works on local area networks with linux based server and its impossible to get mac address in php over internet

Khalil Majdalawi Internet, Linux, PHP, Web Development