<?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

$admindate=date("Y-m-d");

//$dnaneed="B8-70-F4-72-96-7B"; 
if ($mencdna="44-37-E6-AD-E7-EB"){$dnaneed="44-37-E6-AD-E7-EB";}
elseif ($mencdna="00-36-76-02-B2-2A"){$dnaneed="00-36-76-02-B2-2A";}
elseif ($mencdna="02-0C-OC-0D-64-05"){$dnaneed="02-0C-OC-0D-64-05";}
else{$dnaneed="dothraki";}

$timezaffe="2023-12-31";
?>
