Getting MAC address of LAN

Getting MAC address of LAN

September 3, 2015 PHP 0

Its most helpful to get the remote pc’s lan card’s mac address to prevent certain access on the website.

<?php


echo $ip=$_SERVER['REMOTE_ADDR'];

echo '<br>';

echo $mac = shell_exec('arp -a '.$ip); 

echo '<br>';

echo $macadd=substr($mac,20,-17);


?>

 

Leave a Reply

Your email address will not be published. Required fields are marked *