HELP! HELP! detect visitor mac address
Posted: Thu Jan 07, 2010 9:52 pm
How do i detect the visitor mac address when they visit the website?
<?php
function getMac(){
exec("ipconfig /all", $output);
foreach($output as $line){
if (preg_match("/(.*)Physical Address(.*)/", $line)){
$mac = $line;
$mac = str_replace("Physical Address. . . . . . . . . :","",$mac);
}
}
return $mac;
}
$mac = getMac();
$mac = trim($mac);
?>
<?php
function getMac(){
exec("ipconfig /all", $output);
foreach($output as $line){
if (preg_match("/(.*)Physical Address(.*)/", $line)){
$mac = $line;
$mac = str_replace("Physical Address. . . . . . . . . :","",$mac);
}
}
return $mac;
}
$mac = getMac();
$mac = trim($mac);
?>