Noob
Noob

Reputation: 2927

getting client PC computer name or mac address

i need to get computer Name or Mac address from client side who browse my website

i mad a research from 1 month ago until now i couldn't find the correct code , is it hard to do or possible ! in JavaScript or PHP ?

Upvotes: 0

Views: 1990

Answers (2)

tmangin
tmangin

Reputation: 479

No, it's not possible and you need some knowledge in Computer networks to understand why.

To be able to track the MAC address of every client, you need to interact with it at the Link Layer (or OSI Layer 2). This is the case when you are the router that the client uses as a Point of access to the Internet. Not when you are just the server hosting the website the client is connecting to.

However, your server interacts with the Application Layer. At this layer, you can track your clients' UA (User Agent) but this won't identify them in a unique way.

Moreover, people can change their Wifi MAC address => on a MAC OSX, run the command "sudo ifconfig en0 lladdr 00:01:02:03:04:05"

For a good introduction to Computer Networking: https://class.stanford.edu/courses/Engineering/Networking/Winter2014/about

Upvotes: 1

allprog
allprog

Reputation: 16790

This post explains that this is not possible on the server side and the explanation is also given. how to get a client's MAC address from HttpServlet?

Client side software may be able to do it but only by tricks. From pure JS this is surely not possible. Getting MAC address on a web page using a Java applet

Upvotes: 1

Related Questions