PHP: is it possible to use php to get the MAC address?
I'm wondering how can i get the MAC Address using PHP. I look over the manual and i don't see any function to work on this as of now.
Sure, use exec() to run ifconfig
(or ipconfig /all
on windows) and parse the result.
You can parse the output of "ifconfig" command or you can parse file "/proc/net/arp". They both contain MAC addr.
精彩评论