You are here: Re: Finding MAC Address « PHP Programming Language « IT news, forums, messages
Re: Finding MAC Address

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация