Ich bin eine kleine Domain-Checker Entwicklung und ich kann nicht .SE an die Arbeit:SEO: Ein Whois-Server, der für .SE-Domains funktioniert?
public string Lookup(string domain, RecordType recordType, SeoToolsSettings.Tld tld)
{
TcpClient tcp = new TcpClient();
tcp.Connect(tld.WhoIsServer, 43);
string strDomain = recordType.ToString() + " " + domain + "\r\n";
byte[] bytDomain = Encoding.ASCII.GetBytes(strDomain.ToCharArray());
Stream s = tcp.GetStream();
s.Write(bytDomain, 0, strDomain.Length);
StreamReader sr = new StreamReader(tcp.GetStream(), Encoding.ASCII);
string strLine = "";
StringBuilder builder = new StringBuilder();
while (null != (strLine = sr.ReadLine()))
{
builder.AppendLine(strLine);
}
tcp.Close();
if (tld.WhoIsDelayMs > 0) System.Threading.Thread.Sleep(tld.WhoIsDelayMs);
return builder.ToString();
}
ich Whois-Server whois.nic-se.se versucht haben und whois.iis.se habe ich behalten bekommen:
# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).
# All rights reserved.
# The information obtained through searches, or otherwise, is protected
# by the Swedish Copyright Act (1960:729) and international conventions.
# It is also subject to database protection according to the Swedish
# Copyright Act.
# Any use of this material to target advertising or
# similar activities is forbidden and will be prosecuted.
# If any of the information below is transferred to a third
# party, it must be done in its entirety. This server must
# not be used as a backend for a search engine.
# Result of search for registered domain names under
# the .SE top level domain.
# The data is in the UTF-8 character set and the result is
# printed with eight bits.
"domain google.se" not found.
Edit:
ich habe mit keinem anderen Ergebnis zu UTF8 versucht zu ändern.
Wenn ich versuche, whois von sysinternals zu verwenden, bekomme ich das richtige Ergebnis, aber nicht mit meinem Code, nicht einmal mit SE.whois-servers.net.
/Niels
Code funktionierts mit whois ser Vers für andere TLDs? –
Ich bekomme richtige Ausgabe mit Sysinternals 'Whois google.se' auf Win7 –
Ja, mein Code funktioniert gut für andere TLDs. Ich verwende whois.internic.net für .com-Domains und das funktioniert gut. –