Quantcast
Channel: Get IP address with URL string? (Java) - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by RanRag for Get IP address with URL string? (Java)

You need to give hostname to getByName() method and it returns the IP address of a host, given the host's name.URL url = new...

View Article


Answer by Victor Stafusa - BozoNaCadeia for Get IP address with URL string?...

Try this:InetAddress address = InetAddress.getByName(new URL(urlString).getHost());To get the raw IP:String ip = address.getHostAddress();

View Article


Get IP address with URL string? (Java)

In my program a user enters a url string, say http://www.engineering.uiowa.edu/~hawkeng//fall01/graphics/potato.gifhow would I get the IP address of this url? I tried usingInetAddress address =...

View Article
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>