I need to know the MAC and the IP address of the connect clients, how can I do this in PHP?
You can do this easily using openWRT. If yo use a captive portal you can mix php and openWRT and make a relation between the IP and the mac.
You can write a simple PHP code using:
$localIP = getHostByName(getHostName());
Later, using openWRT you can go to /tmp/dhcp.leases
, you will get something with the form:
e4:a7:a0:29:xx:xx 10.239.3.XXX DESKTOP-XXX
There, you have the mac, the IP address and the hostname.