最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用ASP做的DNS LOOKUP程序
时间:2022-06-30 11:27:48 编辑:袖梨 来源:一聚教程网
文章转译自ASP101
运行环境,NT(SERVER、WORKSTATION)、W2K
服务器上需要安装WSH2.0或者更高版本
如果您的系统目前没有安装WSH2.0,您可以从以下这个地址去下载它
http://www.mi*c*ro*soft.com/msdownload/vbscript/scripting.asp
里面包含了WSH2.0
下面是源代码
If Request.Form("frmHost") = "" Then
'设置初始值
strIP = Request.ServerVariables("REMOTE_ADDR")
Else
strIP = Request.Form("frmHost")
End If
%>
rMethod = uCase(Request.ServerVariables("REQUEST_METHOD"))
If rMethod = "POST" Then
' Lookup Host
strReturn = nsLookup(strIP)
If strReturn "" Then
Response.Write strReturn
Else
' A Lame Host is any Valid Host that DNS Cannot Resolve
' See InterNic for Details
Response.Write "Lame Host - Could Not Resolve DNS For " _
& strIP & "
"
End If
End If
Function NSlookup(strHost)
'Create Shell Object
Set oShell = Server.CreateObject("Wscript.Shell")
'Run NSLookup via Command Prompt
'Dump Results into a temp text file
相关文章
- 开放空间宁蒙有什么技能 09-15
- 小鸡舰队出击天空首领活动怎么玩 09-15
- 魔法工艺套装如何解锁使用 09-15
- 三国群英传策定九州资源地有什么打法技巧 09-15
- 下一站江湖2马夫人任务怎么完成 09-15
- 小鸡舰队出击终焉灵王队伍如何搭配 09-15