$hostname = "google"; $ipAddress = gethostbynamel($hostname); echo $ipAddress;
strHostName = "google.com"; IPHostEntry ipEntry = DNS.GetHostByName (strHostName); IPAddress [] addr = ipEntry.AddressList; for (int i = 0; i < addr.Length; i++) { Console.WriteLine ("IP Address {0}: {1} ", i, addr[i].ToString ()); }