我搞了一个用ASP编的程序,怎么可以在ASP处理只能在本机使用这程序啊?
八月 3, 2007
发表在: java
我搞了一个用asp编的程序,怎么可以在asp处理只能在本机使用这程序啊?
我试过用cookies记录,但有写客户的机是自动清除cookies的所以不太好,
我想记录这安装程序的级的物理asp,这程序不可以找到自己的机的物理ip
<%
strmac=""
strip = request.servervariables("remote_addr")
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,"-------") then
data = ucase(trim(ts.readline))
strhostname=trim(split(data,"<")(0))
end if
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
strmac = macaddress
%>
ipmac ---> <%=strmac%>
请问打加有什么方法可以办到啊,或有什么程序可以输出自己本机的物理地址啊?
电脑软件技术推荐:
No comments in this entry