日期:2014-05-17 浏览次数:20479 次
public string GetIPByDomain(string domain)
{
try
{
IPHostEntry host = System.Net.Dns.GetHostEntry(domain.Trim());
return host.AddressList.GetValue(0).ToString();
}
catch
{
}
return "DNS出错";
GetIPByDomain("flsjflsjflsjflsjflsjfls59394573957oeworwuoruwlfjlsf.com")