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

前端 未结 16 2567
长发绾君心
长发绾君心 2020-11-22 02:29

I need to know the MAC and the IP address of the connect clients, how can I do this in PHP?

16条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 03:09

    Getting MAC Address Using PHP: (Tested in Ubuntu 18.04) - 2020 Update

    Here's the Code:

    
    

    Output:

    {
        "lo": "00:00:00:00:00:00",
        "enp0s25": "00:21:cc:d4:2a:23",
        "wlp3s0": "84:3a:4b:03:3c:3a",
        "wwp0s20u4": "7a:e3:2a:de:66:09"
    }
    

提交回复
热议问题