macos 如何使用php获取MAC地址?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5786743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:59:52  来源:igfitidea点击:

how to get MAC Address using php?

phpmacosmac-address

提问by

Possible Duplicate:
How can I get the MAC and the IP address of a connected client in PHP?

可能的重复:
如何在 PHP 中获取已连接客户端的 MAC 和 IP 地址?

Hi everybody

大家好你们好

In my website client's requirement is to getting IP address as well as MAC address and PC Name of visitor's machine.

在我的网站中,客户端的要求是获取访问者机器的 IP 地址以及 MAC 地址和 PC 名称。

For IP address no problem I have done.

对于IP地址没问题我已经做了。

But What for MAC address and PC Name?

但是 MAC 地址和 PC 名称呢?

Can we get it via PHP programatically ?

我们可以通过 PHP 以编程方式获取它吗?

If it is possible, can you tell me how to do that?

如果可能的话,你能告诉我怎么做吗?

Please suggest me something about it.

请给我一些关于它的建议。

采纳答案by Mukesh Chapagain

Not tested but this might help:- http://nazmulb.wordpress.com/2008/07/04/getting-mac-address-using-php/

未经测试,但这可能会有所帮助:- http://nazmulb.wordpress.com/2008/07/04/getting-mac-address-using-php/

This script is for getting server's mac address. I don't think it is possible to get clients mac address through php.

此脚本用于获取服务器的 mac 地址。我认为不可能通过 php 获取客户端的 mac 地址。

回答by Ignacio Vazquez-Abrams

Generate a HTML form that asks the user (using normal INPUTelements) what their MAC address and machine name are, and write a PHP script that will capture the submission and insert the data in the appropriate location.

生成一个 HTML 表单,询问用户(使用普通INPUT元素)他们的 MAC 地址和机器名称是什么,并编写一个 PHP 脚本来捕获提交并将数据插入到适当的位置。

In other words, no.

换句话说,没有。