主页 > 编程资料 > C# >
发布时间:2015-09-26 作者:网络 阅读:228次
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" %>








Domain name:
 













关键字词: