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

Answer by Victor Stafusa - BozoNaCadeia for Get IP address with URL string? (Java)

$
0
0

Try this:

InetAddress address = InetAddress.getByName(new URL(urlString).getHost());

To get the raw IP:

String ip = address.getHostAddress();

Viewing all articles
Browse latest Browse all 3

Trending Articles



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