I has been searching a long time in Google but not get what I looking for. I have an local web application for business in different building of my office. My staff will use this application in local network with both wireless devices and desktop computer. But I want to give them access through only limited devices and machines.
I can get the MAC address of connected devices by passing their IP addresses to arp
, for instance:
arp -n 192.168.10.12
in terminal.
But I can't get any output when I run same command in php script
$output = shell_exec('arp -n 192.168.10.12'); echo "<pre>$output</pre>";
I tried some commands such as ls -l /var/www
in shell_exec
function, these commands display the same as in the command line. So my question is why I can't run arp -n ipaddress
command and how to run it.
I can't check the MAC address via router because my business clients like to use my network when they come to my office.
Thanks in advance.
I followed this link.