Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23299 > unrolled thread
| Started by | laredotornado@zipmail.com |
|---|---|
| First post | 2013-04-04 07:17 -0700 |
| Last post | 2013-04-04 21:59 +0200 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.java.programmer
Foolproof way to check if a domain exists? laredotornado@zipmail.com - 2013-04-04 07:17 -0700
Re: Foolproof way to check if a domain exists? Roedy Green <see_website@mindprod.com.invalid> - 2013-04-04 08:32 -0700
Re: Foolproof way to check if a domain exists? laredotornado@zipmail.com - 2013-04-04 09:21 -0700
Re: Foolproof way to check if a domain exists? Arne Vajhøj <arne@vajhoej.dk> - 2013-04-04 16:53 -0400
Re: Foolproof way to check if a domain exists? Joerg Meier <joergmmeier@arcor.de> - 2013-04-04 21:59 +0200
| From | laredotornado@zipmail.com |
|---|---|
| Date | 2013-04-04 07:17 -0700 |
| Subject | Foolproof way to check if a domain exists? |
| Message-ID | <380ee24b-dce1-450a-aa78-ab2d0b675dcd@googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2013-04-04 08:32 -0700 |
| Message-ID | <j67rl8hfjmpqs3utm794eq0aihs7vqkont@4ax.com> |
| In reply to | #23299 |
On Thu, 4 Apr 2013 07:17:33 -0700 (PDT), laredotornado@zipmail.com wrote, quoted or indirectly quoted someone who said : > >Is there a more foolproof way to verify the existence of a domain? there are various WHOIS services you could probe. They will tell you a domain exists if it is registered, even if no server is handling it currently. see http://mindprod.com/jgloss/whois.html -- Roedy Green Canadian Mind Products http://mindprod.com Motors make noise, and that tells you about the feelings and attitudes that went into it. Something was more important than sensory pleasure -- nobody would invent a chair or dish that smelled bad or that made horrible noises -- why were motors invented noisy? How could they possibly be considered complete or successful inventions with this glaring defect? Unless, of course, the aggressive, hostile, assaultive sound actually served to express some impulse of the owner. ~ Philip Slater (born: 1927 age: 85) The Wayward Gate: Science and the Supernatural
[toc] | [prev] | [next] | [standalone]
| From | laredotornado@zipmail.com |
|---|---|
| Date | 2013-04-04 09:21 -0700 |
| Message-ID | <ba2eee77-38c0-418c-9176-b9446592523b@googlegroups.com> |
| In reply to | #23300 |
On Thursday, April 4, 2013 10:32:15 AM UTC-5, Roedy Green wrote: > On Thu, 4 Apr 2013 07:17:33 -0700 (PDT), laredotornado@zipmail.com > > wrote, quoted or indirectly quoted someone who said : > > > > > > > >Is there a more foolproof way to verify the existence of a domain? > > > > there are various WHOIS services you could probe. They will tell you a > > domain exists if it is registered, even if no server is handling it > > currently. > > see http://mindprod.com/jgloss/whois.html > > -- > > Roedy Green Canadian Mind Products http://mindprod.com > > Motors make noise, and that tells you about the feelings and attitudes > > that went into it. Something was more important than sensory pleasure -- > > nobody would invent a chair or dish that smelled bad or that made horrible > > noises -- why were motors invented noisy? How could they possibly be > > considered complete or successful inventions with this glaring defect? > > Unless, of course, the aggressive, hostile, assaultive sound actually served > > to express some impulse of the owner. > > ~ Philip Slater (born: 1927 age: 85) > > The Wayward Gate: Science and the Supernatural Are there Java interfaces for these services? Ideally, I'd like something platform independent. - Dave
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2013-04-04 16:53 -0400 |
| Message-ID | <515de849$0$32113$14726298@news.sunsite.dk> |
| In reply to | #23301 |
On 4/4/2013 12:21 PM, laredotornado@zipmail.com wrote: > On Thursday, April 4, 2013 10:32:15 AM UTC-5, Roedy Green wrote: >> On Thu, 4 Apr 2013 07:17:33 -0700 (PDT), laredotornado@zipmail.com >> wrote, quoted or indirectly quoted someone who said : >>> Is there a more foolproof way to verify the existence of a domain? >> >> there are various WHOIS services you could probe. They will tell you a >> domain exists if it is registered, even if no server is handling it >> currently. >> >> see http://mindprod.com/jgloss/whois.html > > Are there Java interfaces for these services? Ideally, I'd like something platform independent. - Dave http://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/whois/WhoisClient.html Arne
[toc] | [prev] | [next] | [standalone]
| From | Joerg Meier <joergmmeier@arcor.de> |
|---|---|
| Date | 2013-04-04 21:59 +0200 |
| Message-ID | <1f304czftar7w.12yw2cl4450p0$.dlg@40tude.net> |
| In reply to | #23299 |
On Thu, 4 Apr 2013 07:17:33 -0700 (PDT), laredotornado@zipmail.com wrote:
> 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?
My guess would be that Verizon's DNS is faulty and is responding with a
page filled with ads or some such nonsense. Do try a better DNS such as
Googles at 8.8.8.8. If you run the following BEFORE doing anything else in
your code, you might have the platform independent solution you are looking
for:
System.setProperty("sun.net.spi.nameservice.nameservers", "8.8.8.8");
System.setProperty("sun.net.spi.nameservice.provider.1", "dns,sun");
Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web