| w3Sockets Examples |
Examples
Whois
<%@ LANGUAGE="JavaScript" %> <%
socket = Server.CreateObject( "Socket.TCP" ); function whois( Domain, Server ) { %><a href="http://www.<%= domain%>"> <font face="Verdana" size=5><b> <%= domain%></b></font></a> <% // Whois port is 43 socket.Host = Server + ":43"; socket.Open(); // Send the query.... socket.SendLine( Domain ); // Wait for disconnect and output the buffer socket.WaitForDisconnect(); Response.Write( "<blockquote><pre>" + socket.Buffer + "</pre></blockquote>" ); socket.Close(); } %> <html> <body bgcolor="#FFFFFF" text="#000010" link="#0000C0" vlink="#000040" alink="#000040"> <% var DomainName; DomainName = Request.QueryString( "Domain" ).item; %> <% whois( DomainName + ".se", "whois.nic- se.se" ) %> <% whois( DomainName + ".com", "rs.internic.net" ) %> <% whois( DomainName + ".net", "rs.internic.net" ) %> <% whois( DomainName + ".org", "rs.internic.net" ) %> </body> </html> |
|
|
|
|