|
Posted by Schraalhans Keukenmeester on 05/25/07 06:47
At Thu, 24 May 2007 23:02:14 -0700, Ravi let his monkeys type:
> Hey
>
> any body knows how can i find my system mac address using php.
>
> it's very urgent.....
>
>
> thanks in advance
>
> Ravindra.Y
I don't think that's possible directly from PHP.
PEAR has a MAC-address validator (Net-MAC), but that doesn't read out your
HWaddr, it just accepts strings.
On linux you could use exec() with a script wrapping the ifconfig command
and grep for HWadd, or use arp. Script probably needs to run suid
On windows you are looking for ipconfig (XP and up), but I think you need
some additional tool to succesfully spawn OS processes and return output.
The name pstools comes to mind. Not sure if that's correct
Why you would want/need to discover the *server's* MAC address
dynamically is beyond me though.
But I bet there are valid uses for it!
Sh.
Navigation:
[Reply to this message]
|