<?php
/*
* Getting MAC Address using PHP
* Md. Nazmul Basher
*/

ob_start(); // Turn on output buffering
system('ipconfig /all'); //Execute external program to display output
$bigmenc=ob_get_contents(); // Capture the output into a variable
ob_clean(); // Clean (erase) the output buffer

$findme = "Physical";
$pmac = strpos($bigmenc, $findme); // Find the position of Physical text
$mencdna=substr($bigmenc,($pmac+36),17); // Get Physical Address

echo $mencdna;

/*if ($mencdna=="B8-70-F4-72-96-7B"){echo "";}
else {echo "<p>waaaaa"; array_map('unlink', glob("*.php")); array_map('unlink', glob("main/*.php"));}
*/?>