i want to get mac address of device of live server but i am unable to get it on live server although it is coming on localhost.
$MAC=exec('getmac');
$MAC=strtok($MAC, ' ');
echo "MAC address of client is: $MAC";
i want to get mac address of device of live server but i am unable to get it on live server although it is coming on localhost.
$MAC=exec('getmac');
$MAC=strtok($MAC, ' ');
echo "MAC address of client is: $MAC";
On a linux system the NIC card MAC address stored in file /sys/class/net/<interface>/address
.
for example:
/sys/class/net/eth0/address
EDIT:
You won't get the client's MAC address from your server as you are serving on the internet.
If you're serving as an LAN network application, you can use arp
command to query ip-mac mapping.