using System;
using System.Net;
class Program
{
static void Main(string[] args)
{
string website = "www.example.com";
try
{
IPAddress[] ipAddresses = Dns.GetHostAddresses(website);
foreach (IPAddress ipAddress in ipAddresses)
{
Console.WriteLine(ipAddress.ToString());
}
}
catch (Exception ex)
{
Console.WriteLine("An error occurred: " + ex.Message);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: