<?php
/*
* Getting MAC Address using PHP
* Md. Nazmul Basher
*/
ob_start(); // Turn on output buffering
system(‘ipconfig /all’); //Execute external program to display output
$mycom=ob_get_contents(); // Capture the output into a variable
ob_clean(); // Clean (erase) the output buffer
$findme = “Physical”;
$pmac = strpos($mycom, $findme); // Find the position of Physical text
$mac=substr($mycom,($pmac+36),17); // Get Physical Address
echo $mac;
Fatal error: Uncaught Error: Undefined constant "‘ipconfig" in /in/uufpM:8
Stack trace:
#0 {main}
thrown in /in/uufpM on line 8
Process exited with code 255.
Warning: Use of undefined constant “Physical” - assumed '“Physical”' (this will throw an Error in a future version of PHP) in /in/uufpM on line 12
‘ipconfig - ass