adragan Posted July 4, 2012 Posted July 4, 2012 Is it possible to get the MAC of a remore client ? I know Indy in 9 version could do that. Quote
dieger Posted July 4, 2012 Posted July 4, 2012 Is it possible to get the MAC of a remore client ? I know Indy in 9 version could do that. I think that isn´t possible because of security. The problem is that browsers don't allow you to get the mac address, because it would allow users to be identified uniquely. In IE you can get around this by writing an ActiveX control, and script that with javascript (which you did), but ActiveX is something only available in IE on Windows. Other solution can be a Java applet. Code to IE: var macAddress = ""; var ipAddress = ""; var computerName = ""; var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}"); e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")); for(; !e.atEnd(); e.moveNext()) { var s = e.item(); macAddress = s.MACAddress; ipAddress = s.IPAddress(0); computerName = s.DNSHostName; } Quote
adragan Posted July 5, 2012 Author Posted July 5, 2012 Thanks I'll try that. I have some mobile users and I need to identify them. I hoped that could have been a solution. Quote
zilav Posted July 5, 2012 Posted July 5, 2012 You should identify mobile clients by browser's agent string. Quote
zilav Posted July 6, 2012 Posted July 6, 2012 http://stackoverflow.com/questions/1005153/auto-detect-mobile-browser-via-user-agent Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.