欢迎光临
我们一直在努力

WebService实例-域名查询~-.NET教程,Web Service开发

建站超值云服务器,限时71元/月

接口说明文档:

http://whois.aspsir.com/whois.asmx?wsdl

  

程序代码:

<form name="form1" method="post" action="test.asp">

<table width="318" border="0" cellpadding="2" cellspacing="0">

<tr>

<td width="36"><div align="right">www.</div></td>

<td width="218"><input name="strdomain" type="text" id="strdomain" value="stefli.com" size="30" maxlength="30"></td>

<td width="42"><input type="submit" name="submit" value="查询"></td>

</tr>

</table>

</form>

<%

strdomain = request.form("strdomain")

strurl = "http://whois.aspsir.com/whois.asmx/lookup?strdomain=" & strdomain & ""

set oxmlhttp = server.createobject("microsoft.xmlhttp")

oxmlhttp.open "get", strurl, false

oxmlhttp.send()

if oxmlhttp.readystate <> 4 then response.write err.description

strresult = bytes2bstr(oxmlhttp.responsebody)

if instr(strresult,"no match")<>0 then

response.write "域名[www." & strdomain & "]居然还没有被注册!"

else

response.write "呵呵,来晚了一步!域名已经被注册~"

end if

set oxmlhttp = nothing

function bytes2bstr(vin)

dim strreturn

dim i, thischarcode, nextcharcode

strreturn = ""

for i = 1 to lenb(vin)

thischarcode = ascb(midb(vin, i, 1))

if thischarcode < &h80 then

strreturn = strreturn & chr(thischarcode)

else

nextcharcode = ascb(midb(vin, i + 1, 1))

strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))

i = i + 1

end if

next

bytes2bstr = strreturn

end function

%>

<br>

<br>

接口说明文档:<br>

<br>

&nbsp;&nbsp;&nbsp;&nbsp;http://whois.aspsir.com/whois.asmx?wsdl

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » WebService实例-域名查询~-.NET教程,Web Service开发
分享到: 更多 (0)