<%On Error Resume NextServer.ScriptTimeOut=9999999Function getHTTPPage(Path) t = GetBody(Path) getHTTPPage=BytesToBstr(t,'GB2312')End functionFunction GetBody(url) on error resume next Set Retrieval = CreateObject('Microsoft.XMLHTTP') With Retrieval .Open 'Get', url, False, '', '' .Send GetBody = .ResponseBody End With Set Retrieval = Nothing End FunctionFunction BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject('adodb.stream') objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothingEnd Function%><%'''''''''''''''''''''''''''''''''''''' 功 能:查询域名是否被注册' 作 者:jason' 网 站: www.rrjf.com.cn' 文章为作者原创,转载请注明文章出处' 保留作者信息,谢谢支持! '''''''''''''''''''''''''''''''''''''dns=request('dns')ext=request('ext')e=Split(ext,',')For i=0 To UBound(e) edns=dns & '.' & trim(e(i)) url='http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain='&edns wstr=getHTTPPage(url) if instr(lcase(wstr),'registered')>0 then response.write edns &':已被注册
' else response.write edns &':可以注册
' end if next%>
' else response.write edns &':可以注册
' end if next%>
方法/步骤
1
打开txt,把以上代码复杂上去,保存后命名为search.asp
2ASP域名查询
3
打开txt,把以上代码复杂上去,保存后命名为index.asp,运行即可。
上一篇:出现域名解析错误时的快速解决方案