Usually arp on Linux requires the user to be logged in as root. If you can run it, try this: <? ob_start(); passthru('arp '.$ip_addr); $MAC = ob_get_contents(); ob_end_clean(); ?> On 4/20/07, Nathaniel Hall <halln@xxxxxxxxxxxxxxxxx> wrote:
Hi all, I am attempting to find the MAC address of systems visiting my page from the local LAN. I have tried several things, but it appears it will not let me run system commands. For example, running <?php $MAC = system("arp 192.168.200.254"); echo $MAC; ?>" does not give me any output. I have copied arp to a place that the apache user can execute from and ensured arp is executable. This is on a Fedora Core 6 box running PHP 5.1.6-3.4 and Apache 2.2.3-5. Any help is appreciated. -- Nathaniel Hall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107