ASP Components Introduction-w3sockets

Source: Internet
Author: User
Tags set socket socket domain domain name
Here mainly describes how to use the component Whois domain name, the current online many domain name query system is through XMLHTTP access to other web data, and get records. In fact, we can fully implement the function of Whois by w3sockets ourselves.

The program code is as follows:


Code: [Copy to Clipboard]
<% @ language=vbscript%>
<%
Dim Domain,socket
Domain = "91now" here take 91now as an example
Set socket = Server.CreateObject ("socket.tcp") ' Creates a socket object

function whois (Domain, Server)
Socket. Host = Server + ": 43" ' Set the address
Socket. Open () opens

Socket. Sendline (Domain) ' Pass variables

Socket. Waitfordisconnect ()

Response.Write ("<blockquote><pre>" + socket. Buffer + "</pre></blockquote>") ' Get content
Socket. Close () ' Off

End Function
%>


<body bgcolor= "#FFFFFF" text= "#000010" link= "#0000C0" vlink= "#000040" alink= "#000040" >

<%call whois (domainname + ". com", "rs.internic.net")%>
<%call whois (domainname + ". Net", "Rs.internic.net")%>
<%call whois (domainname + ". org", "rs.internic.net")%>

</body>




Related Article

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.