L
laredotornado
Hi,
We're using Java 6. We are trying to use the following code to determine if a domain exists:
????????????InetAddress inetHost = InetAddress.getByName(domain);
????????????String hostName = inetHost.getHostName();
This usually works fine -- if a domain doesn't exist, an "UnknownHostException" is thrown. However, we notice this isn't true for the Verizon ISP. Instead hostname is equal to the domain (e.g. "locohost") that doesn't exist.. Therefore, it is hard to tell what exists and what doesn't.
Is there a more foolproof way to verify the existence of a domain?
Thanks, - Dave
We're using Java 6. We are trying to use the following code to determine if a domain exists:
????????????InetAddress inetHost = InetAddress.getByName(domain);
????????????String hostName = inetHost.getHostName();
This usually works fine -- if a domain doesn't exist, an "UnknownHostException" is thrown. However, we notice this isn't true for the Verizon ISP. Instead hostname is equal to the domain (e.g. "locohost") that doesn't exist.. Therefore, it is hard to tell what exists and what doesn't.
Is there a more foolproof way to verify the existence of a domain?
Thanks, - Dave