How to get client MAC address by a access on a website?


How to get client MAC address by a access on a website?
I have my website, and it records the number of visitors, IP and time of access...
I want to identify each visitor... I think that this was possible recording IP Address... but when the IP is dynamic, my system fails. So I think that I can solve it recording MAC address... is possible? What language should use? PHP, ASP, Javascript?
Thanks
Edit: What I can use to identify each user without having login information (username & pwd).
Regarding your edit: That should be a new question.
– Mike Atlas
Aug 11 '10 at 2:44
Look up how to use cookies, every web service language should support them. Cookies will be tied to an individual machine--even on a dynamic ip.
– FloppyDisk
Aug 11 '10 at 3:29
5 Answers
5
The MAC address, by TCP/IP standards, is never communicated outside of the local-area network to which it pertains -- routers beyond that LAN don't even get the information you're trying to record. There are many other ways to try and identify unique visitors, including matching the user-agent's details in addition to the IP, serving cookies as part of your response, &c: it is, after all, a core functionality in the field of "web analytics". MAC addresses are simply not part of the gamut of techniques that it makes sense to utilize for it!-)
Please tel me how i can get clients ip address?
– Engr Zardari
Jan 9 '14 at 11:03
i tried with $_SERVER['REMOTE_ADDR'] but it returns loop back ip on local and on live it returns an ip which is same, i loged in from any machine
– Engr Zardari
Jan 9 '14 at 11:04
i also tried $_SERVER['HTTP_CLIENT_IP'] ,$_SERVER['HTTP_X_FORWARDED_FOR'] , but no solution
– Engr Zardari
Jan 9 '14 at 11:05
@Engr - This is probably what you're looking for: stackoverflow.com/questions/1634782/…
– Task
Mar 21 '14 at 17:05
It is only possible if you use a technique where you install a "native" app on the client machine. For example, an activeX component, java applet or a client application. Then that application, once installed can get the MAC and then call to your web server with the MAC as an argument. In other words, you have to build your own front end "browser" to handle logging in. Then once the user is logged in, you can launch the app in the default browser.
It would be nice if future browsers allowed users to give permission to specific sites to access the MAC. Then if a site had a button that said "Register this device" the web application could do so without needing an additional native app installed (after all, the browser IS a native app).
I disagree with the "It would be nice..." - MACs can be spoofed easily and would provide no real security.
– Basic
Jul 20 '13 at 10:53
Can't you just have them store a cookie, so that when they come back they can be uniquely identified? No username/password requirement.
http://en.wikipedia.org/wiki/HTTP_cookie
But cookie isn't reliable... isn't it?
– Wali
Jul 21 '13 at 15:22
@Wali Kind of, but what is really completely reliable in the internet? I did change my computer's MAC address to gain more data, it was in a library and they only allow every user to transfer 200MB data through the wifi. You are right, cookie isn't reliable, but in some situations, it's acceptable.
– cyl19910101
Aug 24 '17 at 20:43
So that doesn't solves the problem to get client MAC address :)
– Wali
Dec 3 '17 at 17:04
Sorry but sending MAC address isn't part of the HTTP. However, you can use cookie to identify different users. Any backend language will do (add cookie in the server side). You can set the cookie in the client side using JavaScript too.
No way.
Because when you visit a website or connect to the internet using a Router ( when you are behind NAT ) or directly, only your IP Address is visible to the outside world, that too only if it is a static IP Address. If you are using a router and you have an IP like 192.x.y.z and if you visit this site Networking Tools and see your IP, you will see that the IP is different, which is your Router's IP.
Mac Addresses are used only up to your Router. After your request is passed onto the next device from your Router, only your IP is visible, not your Mac Address.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Impossible to get MAC address
– Bang Dao
Aug 11 '10 at 2:32