Re: Find MAC Address in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
On Fri, April 20, 2007 3:00 pm, Nathaniel Hall wrote:
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.

Use exec and the extra args to get error codes.

Can you run 'arp' and get what you want from command line?

Can you 'su' to PHP user and *then* run it and get what you want?

If not, you can't do that.

I dunno what 'arp' is gonna give you, but I wouldn't think you'd in
general have access to the MAC address of a visitor hardware...  Nor
should you, actually...  But if you've got your boxes configured to
let any ol' person run this 'arp' thing and reply with their MAC
addresses, I guess it oughta work...

Thanks for the help. I believe I have narrowed it down to SELinux keeping Apache from executing commands. Anybody had the same problem and know a fix?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux