Home > Back-end >  Use getByName and getHostName method failed to get the IP address
Use getByName and getHostName method failed to get the IP address

Time:09-25

Try by hostname using InetAddress. GetByName () and InetAddress getHostAddress () to obtain IP address, for example, baidu will find the result with the actual results are completely different,
The following code

The real results should be 111.13.100.91
My output result is 36.152.44.95
  • Related