TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Get MAC Address of System using PHP
Bhushan Singh
Oct 13
2014
Code
43
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
index.zip
?php
// Turn on output buffering
ob_start();
//Get the ipconfig details using system commond
system(
'ipconfig /all'
);
// Capture the output into a variable
$mycomsys
=ob_get_contents();
// Clean (erase) the output buffer
ob_clean();
$find_mac
=
"Physical"
;
//find the "Physical" & Find the position of Physical text
$pmac
=
strpos
(
$mycomsys
,
$find_mac
);
// Get Physical Address
$macaddress
=
substr
(
$mycomsys
,(
$pmac
+36),17);
//Display Mac Address
echo
$macaddress
;
?>
mac address
get mac address in php
how to find out mac address in php