Return to Snippet

Revision: 50913
at September 8, 2011 22:56 by mariraj


Initial Code
exec("ipconfig /all", $output);
foreach($output as $line){
if (preg_match("/(.*)Physical Address(.*)/", $line)){
$mac = $line;
$mac = str_replace("Physical Address. . . . . . . . . :","",$mac);
}
}
echo trim($mac);

Initial URL

                                

Initial Description
find a mac address using php

Initial Title
Find mac address

Initial Tags
mac

Initial Language
PHP