Getting MAC Address using PHP
Posted by Raj
Getting MAC Address using PHP
In this article,I will explain how to get MAC address in PHP using Simple php script.
How can I get the MAC and the IP address using PHP.
Example:
<?php
ob_start();
system("ipconfig /all");
$cominfo=ob_get_contents();
ob_clean();
$search = "Physical";
$primarymac = strpos($cominfo, $search);
$mac=substr($cominfo,($primarymac+36),17);//MAC Address
echo $mac;
?>
Output:
10-AA-CC-55-3B-BB
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
Check MAC in php,
find MAC address in PHP,
MAC address in php,
PHP,
PHP interview questions and answers,
Unique id in php
.You can leave a response, or trackback from your own site.