queryinternic.aspx
<% @Page Language="C#" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<%
TcpClient tcpc = new TcpClient(,',',');
try
{
tcpc.Connect("whois.networksolutions.com", 43,',',');
}
catch(SocketException ex)
{
Response.Write(ex.ToString(),',',');
Response.End(,',',');
}
String strDomain = "gotdotnet.com\r\n";
Byte[] arrDomain = Encoding.ASCII.GetBytes(strDomain.ToCharArray(),',',');
Stream s = tcpc.GetStream(,',',');
s.Write(arrDomain, 0, strDomain.Length,',',');
StreamReader sr = new StreamReader(tcpc.GetStream(), Encoding.ASCII,',',');
string strLine = null;
while (null != (strLine = sr.ReadLine()))
{
Response.Write(strLine + "
",',',');
}
tcpc.Close(,',',');
%>
queryregistries.aspx
<% @Page Language="C#" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Collections" %>
<% @Page Language="C#" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<%
TcpClient tcpc = new TcpClient(,',',');
try
{
tcpc.Connect("whois.networksolutions.com", 43,',',');
}
catch(SocketException ex)
{
Response.Write(ex.ToString(),',',');
Response.End(,',',');
}
String strDomain = "gotdotnet.com\r\n";
Byte[] arrDomain = Encoding.ASCII.GetBytes(strDomain.ToCharArray(),',',');
Stream s = tcpc.GetStream(,',',');
s.Write(arrDomain, 0, strDomain.Length,',',');
StreamReader sr = new StreamReader(tcpc.GetStream(), Encoding.ASCII,',',');
string strLine = null;
while (null != (strLine = sr.ReadLine()))
{
Response.Write(strLine + "
",',',');
}
tcpc.Close(,',',');
%>
queryregistries.aspx
<% @Page Language="C#" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Collections" %>
关键字词: