Re: Find MAC Address in PHP

From: Date: Mon, 23 Apr 2007 12:51:59 +0000
Subject: Re: Find MAC Address in PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-253516@lists.php.net to get a copy of this message
Em Domingo 22 Abril 2007 03:12, Richard Lynch escreveu: > On Fri, April 20, 2007 3:00 pm, Nathaniel Hall wrote: > > <?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. ARP is a root-command... =] > > Can you run 'arp' and get what you want from command line? As web-user? No. > > Can you 'su' to PHP user and *then* run it and get what you want? Hum... Not at all... You need to enter the root password... How can you do that? sudo sounds a little better... But... How about security? > > If not, you can't do that. And with a shell-script outputting the MAC to a .txt temp file, reading it from the PHP script? BTW, have a look at suPHP [1]... =] [1] - http://www.howtoforge.com/suphp_debian_etch_ispconfig -- Davi Vidal davividal@siscompar.com.br davividal@gmail.com -- Agora com fortune: "Most people will listen to your unreasonable demands, if you'll consider their unacceptable offer."

Attachment: [application/pgp-signature]
« previous php.general (#253516) next »