อยากได้ code who is domain ที่เป็น Asp.NET ใครมีบ้าง
Tag : - - - -
Date :
19 ก.ย. 2550 12:28:24
By :
som
View :
1692
Reply :
1
No. 1
Guest
Code (VB.NET)
<% @Page Language="VB" %>
<% @Assembly Name="System.Net" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<%
Dim tcpc As New TCPClient()
If 0 = tcpc.Connect("whois.networksolutions.com", 43) Then
Dim strDomain As [String] = "microsoft.com" + ControlChars.Cr + ControlChars.Lf
Dim arrDomain As [Byte]() = Encoding.ASCII.GetBytes(strDomain.ToCharArray())
Dim s As Stream = tcpc.GetStream()
s.Write(arrDomain, 0, strDomain.Length)
Dim sr As New StreamReader(tcpc.GetStream(), Encoding.ASCII)
While - 1 <> sr.Peek()
Response.Write((sr.ReadLine() + "<br>"))
End While
tcpc.Close()
Else
Response.Write("Could not connect to WHOIS server!")
End If
%>