如何实现网站只允许某台电脑访问?

jatelo_hele 2006-08-30 10:22:27
最近遇到点难题,想把网站后台改台只允许自己电脑访问,不知道用什么方法好,自己的电脑是ADSL动态拔号,限定IP似乎太难....有没有好的方法,如果用绑定网卡mac地址的话,该怎么实现?
...全文
211 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
sunlinwh 2006-08-31
  • 打赏
  • 举报
回复
加个登录不行吗?
zz95469 2006-08-31
  • 打赏
  • 举报
回复
干脆家访问用户,登陆时候提示输入密码
非凡笨笨 2006-08-31
  • 打赏
  • 举报
回复
那你在客户端也读不到啊~~
tcmis 2006-08-31
  • 打赏
  • 举报
回复
对,用mac地址,好象不需要注册dll,机器本身就有啊。
gmj_1019 2006-08-31
  • 打赏
  • 举报
回复
strIP = Request.ServerVariables("REMOTE_ADDR")

strMac = GetMACAddress(strIP)
strHost = Request.ServerVariables("REMOTE_HOST")


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"
Set fso = nothing
GetMACAddress = macaddress
End Function
需要注册几个dll读取mac地址
当然mac地址也可以更改

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧