Separate names with a comma.
Discussion in 'IP Phones' started by Elbhrawy, Jan 17, 2010.
I need to make a function($network , $vendor ,$mac) and return the $ipaddress for the endpoint.
You can use a shell cmd and take the result:
# arp -n or
# apr -a
Play with the pipe - grep ( | grep ) to filter it.
Use in same time: nmap -sP --send-ip -n 192.168.1.0/24 with also | grep the vendor.
nmap -sP --send-ip -n 192.168.1.0/24 | grep Cisco for example.
Like that with this cmd you have the Mac address, and with arp you may have the IP address.
Now, with different php functions like explode for example, you can make what you want.
It's a way... :cheer: