How to get Mac Address Computer Client


Sometime, we want to get Mac Address number from computer client that access server. I have little function to read it. Check it bro… It’s Work

<?

$ip=$_SERVER[‘REMOTE_ADDR’];
echo “<br>IP : “.$ip;

function getMacAddress($ip){
$output = shell_exec(“nbtstat -a $ip”);
$output = explode(“\n”,$output);
$mac_line = explode (“=”, $output[ sizeof($output)-3 ]);
$mac = trim($mac_line[1]);
return $mac;
}

echo “<br>$ip : “.getMacAddress($ip);
?>

About blackphp

All about programming php, ajax, jquery, mysql, etc, tips n trick. Now, i'm concern in php programming with codeigniter framework n also training my design skill with photoshop or corel... wish me luck! ('o')

Posted on August 9, 2011, in PHP and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: