[Java] Url to IP converter
September 21st, 2009
/*--------------------------------------------------------------------------
UrlToIP.java
*****************
By: HappyFace http://www.engineeringserver.com
Contact: info [@] engineeringserver.com
Version: 05/may/2009
"*****************
Note: shows the IP address that belong to the domain name
//----------------------------------------------------------------------*/
import java.net.InetAddress;
import java.net.UnknownHostException;
public class UrlToIP {
public static void main(String[] args){
String hostName ="www.retardedweblogger.com";
try {
System.out.println("Url: " + InetAddress.getByName(hostName).getHostName());
System.out.println("IP: " + InetAddress.getByName(hostName).getHostAddress());
} catch (UnknownHostException e) {
e.printStackTrace();
}
}
}
UrlToIP.java
*****************
By: HappyFace http://www.engineeringserver.com
Contact: info [@] engineeringserver.com
Version: 05/may/2009
"*****************
Note: shows the IP address that belong to the domain name
//----------------------------------------------------------------------*/
import java.net.InetAddress;
import java.net.UnknownHostException;
public class UrlToIP {
public static void main(String[] args){
String hostName ="www.retardedweblogger.com";
try {
System.out.println("Url: " + InetAddress.getByName(hostName).getHostName());
System.out.println("IP: " + InetAddress.getByName(hostName).getHostAddress());
} catch (UnknownHostException e) {
e.printStackTrace();
}
}
}

