How to get Client MAC or Physical address in PHP?
<?php echo getMacAddress();
function getMacAddress()
{
ob_start();
system('getmac');
$Content = ob_get_contents();
ob_clean();
return substr($Content,
strpos($Content,'\\')-20, 17);
}
Tags: How to get Client MAC or Physical address
Anuj Kumar
Hi, I’m Anuj Kumar, a passionate web developer with expertise in PHP, Laravel, CodeIgniter, MySQL, and Bootstrap. I enjoy building clean, responsive, and scalable web applications that address real-world challenges. I love creating student-friendly projects, sharing practical coding tips, and helping developers—especially beginners—strengthen their skills. Through this website, my goal is to simplify complex concepts, offer ready-to-use project solutions, and support the developer community with useful, hands-on resources.
Hello,
Welcome to PHPGurukul.
How can I help you?
🟢 Online | Privacy policy
