Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DNS Reverse Lookup???

 
James wu
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have a IP address, say, 216.115.109.6, then how can I get the domain name - www.yahoo.ca in Java.
Thank you very much for any help!
 
Vladan Radovanovic
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did You try getHostName() method of InetAddress class?
That should do it.
Vladan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic