 |
网站建设 |
 |
 |
最新客户 |
 |
 |
网站推广 |
 |
 |
推广知识 |
 |
|
 |
建站技术知识 |
 |
|
|
|
|
域名登记查询(whois)很复杂吗--方法二
|
voodoo发表于 2000-06-03 22:42:07<%@ Language=VBScript %><HTML><HEAD><META NAME=GENERATOR Content=Microsoft Visual Studio 6.0></HEAD><BODY><form action=whois.asp method=post>域名:www<B>.</B> <INPUT size=8 name=domainname value=<% =request(domainname) %>>. <SELECT name=ext> <OPTION selected>com</OPTION><OPTION>net</OPTION><OPTION>org</OPTION><OPTION>com.cn</OPTION> <OPTION>net.cn</OPTION> <OPTION>org.cn</OPTION> </SELECT> <INPUT class=input1 type=submit value=域名查询 name=Submit> </form><%dim strResultif Request.ServerVariables(request_method)=POST THENdim strQuery取得需要查询的域名strQuery=request(domainname) & . & request(ext)dim objSock创建sock对象Set objSock=Server.CreateObject(Aspsock.conn)设置whois服务器为rs.internic.netselect case request(ext)case com,net,orgobjSock.RemoteHost=rs.internic.netgj=0case com.cn,net.cn,org.cnobjSock.RemoteHost=drop.cnnic.net.cngj=1end select设置whois服务器端口为43objSock.Port=43设置操作的超时为60秒objSock.TimeOut=60打开与remotehost的连接,返回真为成功if objSock.Open then发出查询 WriteLn表示用vbCrlf终结(strQuery & vbCRlf)objSock.WriteLn strQuery读取返回值,最大长度为65535strResult=objSock.ReadBytesAsString(65535)关闭连接objSock.Close打印查询结果,你可以需要对此作些处理 Response.Write <b>查询结果</b><br><textarea rows=10 cols=60> & strResult & </textarea>select case gjcase 0str1=inter(strresult)response.write str1Response.Write <b>查询结果</b><br><textarea rows=10 cols=60> & strResult & </textarea>case 1str1=cnnic(strresult)response.write str1Response.Write <b>查询结果</b><br><textarea rows=10 cols=60> & strResult & </textarea>end selectend ifSet objSock=Nothingend iffunction inter(str)if instr(str,No match)=0 thenresponse.write 您的域名已经被注册。elseresponse.write 您的域名没有被注册。end ifend functionfunction cnnic(str)if instr(str,%)=0 thenresponse.write 您的域名已经被注册。elseresponse.write 您的域名没有被注册。end ifend function%></BODY></HTML>
来源:
|
|
|
|
|
|
|
|
 |
|
 |
在线咨询 |
 |
 |
建站服务 |
 |
经济型网站设计套餐 ¥2580 |
企业型网站设计套餐 ¥3980 |
豪华型网站设计套餐 ¥6580 |
商城型网站设计套餐 ¥7580 |
定制型网站设计套餐 ¥面 谈 |
智赢型ABC ¥1580/1980 |
|
|
|
 |
 |
虚拟主机 |
 |
普及型(电信)350元/年 |
经济型(电信)650元/年
|
普及A型(双线)500元/年 |
普及B型(双线)900元/年 |
外贸型(国外) 550元/年
|
企业型(国外) 1050元/年 |
我要订购主机>> |
|
 |
 |
域名注册 |
 |
国际顶级域名.com 100元/年 |
国际顶级域名.net 100元/年 |
国际顶级域名.cc 380元/年 |
国际顶级域名.org 180元/年 |
中国顶级域名.cn 100元/年 |
中国顶级域名.com.cn 100元/年 |
中文域名.中国.公司 280元/年 |
我要注册域>> |
|
 |
|