I need to know the MAC and the IP address of the connect clients, how can I do this in PHP?
under linux using iptables you can log to a file each request to web server with mac address and ip. from php lookup last item with ip address and get mac address.
As stated remember that the mac address is from last router on the trace.