public string GetIPByDomain(string url)
{
if (url.Trim() == string.Empty)
return "";
try
{
System.Net.IPHostEntry host = System.Net.Dns.GetHostEntry(url);
return host.AddressList.GetValue(0).ToString();
}
catch (Exception e)
{
throw e;
}
}