Results 1 to 1 of 1
-
Printing all IP address of a site
Sometimes a website used more than one IP addresses. Following code snippet prints all the IP addresses for the given site.
Java Code:try { InetAddress[] addresses = InetAddress.getAllByName("www.microsoft.com"); for (int i = 0; i < addresses.length; i++) { System.out.println(addresses[i]); } } catch (UnknownHostException ex) { System.out.println("Could not find www.microsoft.com"); }
Similar Threads
-
New java site for beginers
By windyawarnapura in forum Java SoftwareReplies: 1Last Post: 03-14-2008, 06:02 PM -
Code to connect to a web site
By suji in forum NetworkingReplies: 1Last Post: 02-15-2008, 04:05 PM -
Site hacked
By tim in forum Suggestions & FeedbackReplies: 3Last Post: 02-02-2008, 09:47 AM -
How can I get a RealMedia file from a web site?
By emesol0 in forum NetworkingReplies: 0Last Post: 01-24-2008, 07:01 PM -
An amateur Java Tutorials Site
By elasolova in forum Reviews / AdvertisingReplies: 1Last Post: 01-18-2008, 09:23 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks