I need to know the MAC and the IP address of the connect clients, how can I do this in PHP?
You can use the following solution to solve your problem:
$mac='UNKNOWN'; foreach(explode("\n",str_replace(' ','',trim(`getmac`,"\n"))) as $i) if(strpos($i,'Tcpip')>-1){$mac=substr($i,0,17);break;} echo $mac;