SEMrush

How to get IP Address and Hostname of server ?

YOUR DAILY TECHNOLOGY TIDBIT !


Did you know How to Find a Hostname for an IP Address ?



  1. InetAddress.getLocalHost() : In Java InetAddress.getLocalHost() function is used to get the Ip Address of the current Server that is running the Java app
  2. InetAddress.getHostName() : InetAddress.getHostName() is used to get Hostname of the current Server name. 

Must Read : 







Comments