The IP address of the remote PC is available to be checked.
So if you know the IP addresses of these PCs that are allowed to access the page, you could check for them.
Something like this, as a really brief example. Adjust to suit.
theIP = request.servervariables("REMOTE_ADDR"
If theIP <> "this" or theIP <> "that" Then
response.write("You're Not Allowed!!"
End If
How if the Ip address is not fix! And also I have tried the solution you given, the IP address comes out are different from the IP address that I have!
Is just like that, my PC having 141.253.146.110 as IP
but when using theIP = request.servervariables("REMOTE_ADDR"
I don't think the MAC address (is the network address) is available directly fron ASP. But with the free ASPExec server plugin from ServerObjects, then the follwomg code should work.
<%
Dim Executor
Dim Result
Dim MAC
Set Executor = Server.CreateObject("ASPExec.Execute"
Executor.Application = "nbtstat.exe"
Executor.Parameters = "-A " & Request.ServerVariables("REMOTE_ADDR"
Result = Executor.ExecuteDosApp
Set Executor = Nothing
MAC = Mid(Result, Instr(Result, "MAC Address" + 14, 17)
Response.Write MAC
%>
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.