WebService instance-domain query ~

Source: Internet
Author: User
Web Interface Description Document:
http://whois.aspsir.com/whois.asmx?wsdl
  
Program code:

<form name= "Form1" method= "Post" action= "test.asp" >
<table width= "318" border= "0" cellpadding= "2" cellspacing= "0" >
<tr>
&LT;TD width= "><div" align= "right" >www.</div></td>
&LT;TD width= "218" ><input name= "Strdomain" type= "text" id= "Strdomain" value= "stefli.com" size= "maxlength=" "></td>
&LT;TD width= "><input" type= "Submit" name= "submit" value= "Query" ></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 "Domain name [www." & Strdomain & "] is not yet registered!"
Else
Response.Write "Oh, come a step late!" domain name has been registered ~ "
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>
Interface Description Document:<br>
<br>
http://whois.aspsir.com/whois.asmx?wsdl



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.