Просмотр полной версии : [C#]whois script failed
ekraner.qsh.eu/whois.aspx, whois.rar
Код в студию , опционально с более подробным описанием проблемы
That whois program. -> http://www.ekraner.qsh.eu/whois.aspx. That source code. -> http://www.ekraner.qsh.eu/whois.txt. When i writen for example such domain as site.net whois back false result.
sry , my Eng Grammar Suxx
oh , this example just send data to whois.ripe.net and parse response to Text Item ,
Some knowledge of the protocol can be usefull
http://en.wikipedia.org/wiki/WHOIS
also try this example...
http://209.85.135.104/search?q=cache:zFLtssWT1DwJ:www.stewshack.com/aspnet/WhoIs.aspx&hl=ru&ct=clnk&cd=4
Нету такого http://www.stewshack.com/aspnet/WhoIs.aspx адреса.
procedure
01.01.2009, 18:53
Решение:
TcpClient tcpc = new TcpClient();
try
{
tcpc.Connect("whois.networksolutions.com", 43);
}
catch(SocketException ex)
{
Response.Write(ex.ToString());
Response.End();
}
String strDomain = "forum.antichat.ru\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 + "<br>");
}
tcpc.Close();
Сори что поднял.
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot