Getting URL given IP address

ganesh_don's Avatar
Go4Expert Member
Buddies i need to get the URL given an IP address(that is a reverse DNS lookup) i tried using InetAddress getHostName() method but its working for some IPs and for the rest its retruning the same IP as the output.Is there any alternate methods that solves this problem.If so plz inform me.......Thanks in advance
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Well, for reverse dns lookup the dns server must have a reverse entry for that IP otherwise it'll return the IP. Read more http://en.wikipedia.org/wiki/Reverse_dns
ganesh_don's Avatar
Go4Expert Member
Thank you dude....

ok is there any way to get the HTML of a webpage given the IP address.
I found all the URL class construtors take url as argument.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
You can use CURL, read more http://en.wikipedia.org/wiki/CURL
ganesh_don's Avatar
Go4Expert Member
Thank u dude.....