Jump to content

Archived

This topic is now archived and is closed to further replies.

kennedysee

detect visitor mac address

Recommended Posts

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);

?>

Share this post


Link to post
Share on other sites

You cannot get their MAC address, namely because you do not have access to their computer. If you install an ActiveX control you can probably get it. But what you want to do is not possible through PHP, as far as I know. And definitely not in the way you are trying to. Sorry bud.

Share this post


Link to post
Share on other sites

The code your currently using will get the mac address of the server on which your script is running. I dont think it's possible to get the mac address using PHP.

Share this post


Link to post
Share on other sites

It is impossible to get a users mac address in any programming language from server-side MAC address's are only used locally seeing as it is a layer 2 frame and is only used by routers,gateways and local pc's to route local traffic only.

Share this post


Link to post
Share on other sites

It is impossible to get a users mac address in any programming language from server-side MAC address's are only used locally seeing as it is a layer 2 frame and is only used by routers,gateways and local pc's to route local traffic only.

 

Plus they are unreliable like IP's so in the end it still won't work.

Share this post


Link to post
Share on other sites

how are they unreliable ?? I mean IPs can be Spoofed but so can hardware mac address's I am willing to bet that the majority of people whom know how to IP Spoof of 1 form or another know nothing of either how to "spoof" or "change" a MAC address... Seeing as the MAC is "Burned" into the flash memory on your NIC if you could track somebody by their MAC it would be alot more reliable. Because where in the world 2 machines or 10,000 machines can have the same IP address (in many different local area networks, With private addressing) But No 2 NICs in the World have the same MAC addy :/

Share this post


Link to post
Share on other sites

how are they unreliable ?? I mean IPs can be Spoofed but so can hardware mac address's I am willing to bet that the majority of people whom know how to IP Spoof of 1 form or another know nothing of either how to "spoof" or "change" a MAC address... Seeing as the MAC is "Burned" into the flash memory on your NIC if you could track somebody by their MAC it would be alot more reliable. Because where in the world 2 machines or 10,000 machines can have the same IP address (in many different local area networks, With private addressing) But No 2 NICs in the World have the same MAC addy :/

 

just google for it and more or less everyone who is a little computer literate is able to change his MAC-address...

Share this post


Link to post
Share on other sites

Yes, different networks may have duplicate private IP addresses, however, you cannot connect to the Internet using a private IP address.

 

 

MAC spoofing is quite easily achievable, you can download software which allows you to spoof your MAC address quite easily. You can also get hold of the software used by the company that produced your NIC and update the physical address.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.