开发者

PHP: is it possible to use php to get the MAC address?

开发者 https://www.devze.com 2023-01-15 23:21 出处:网络
开发者_StackOverflow社区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 ipco
开发者_StackOverflow社区

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号