Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Getting URL given IP address (http://www.go4expert.com/forums/getting-url-ip-address-t3396/)

ganesh_don 14Mar2007 14:50

Getting URL given IP address
 
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 14Mar2007 15:54

Re: Getting URL given IP address
 
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 14Mar2007 16:59

Re: Getting URL given IP address
 
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 14Mar2007 17:11

Re: Getting URL given IP address
 
You can use CURL, read more http://en.wikipedia.org/wiki/CURL

ganesh_don 14Mar2007 17:32

Re: Getting URL given IP address
 
Thank u dude..... :)


All times are GMT +5.5. The time now is 00:00.