It is possible to get the mac address using ASP code but I have to tell you that this is not reliable 'coz we tried it. Some use proxy and the mac address of the server is what we get not the mac of the particular user who is accessing the web page. But anyway if you are really up to it I could send you the code.
Function GetMACAddress(strIP)
Set net = Server.CreateObject("wscript.network"
Set sh = Server.CreateObject("wscript.shell"
sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true
Set sh = nothing
Set fso = createobject("scripting.filesystemobject"
Set ts = fso.opentextfile("c:\" & strIP & ".txt"
macaddress = null
Do While Not ts.AtEndOfStream
data = ucase(trim(ts.readline))
If instr(data,"MAC ADDRESS" Then
macaddress = trim(split(data,"="(1))
Exit Do
End If
loop
ts.close
Set ts = nothing
'fso.deletefile "c:\" & strIP & ".txt" 'Used to delete the temp file
Set fso = nothing
GetMACAddress = macaddress
End Function
%>
<HTML>
<HEAD>
<TITLE> MAC MAN</TITLE>
</HEAD>
<BODY>
<%Response.Write("Your IP is : " & strIP & "<BR>" & vbcrlf)%>
<%Response.Write("Your MAC is : " & strMac & vbcrlf)%>
</BODY>
</HTML>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.