私は小さなドメインチェッカーを開発していると私は.SEを動作させることはできません。SEO:.SEドメインで動作するwhoisサーバですか?
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();
}
私はWHOISサーバ私は保つwhois.nic-se.seとwhois.iis.seプットを試してみました取得:
# 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.
編集:
を私は他の結果とUTF8に変更しようとしました。
私はsysinternalsからwhoisを使用しようとすると、正しい結果が得られますが、SE.whois-servers.netを使用しなくても自分のコードでは得られません。私のMac上でwhois google.se
を行うとき
/ニールス
はあなたのコードの作業を行いますwhois serと一緒に他のTLDのためのvers? –
私はWin7でSysinternals 'whois google.se'を使って適切な出力を得ています。 –
はい、私のコードは他のTLDでうまく動作します。 .comドメインにwhois.internic.netを使用していますが、これは問題なく動作します。 –