Jason B Herald x = sin x

19Sep/090

Domain Lookup

Here is some code to do domain lookup in java (nslookup style):

Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
DirContext ictx = new InitialDirContext(env);
Attributes attrs = ictx.getAttributes("gmail.com", new String[]{"MX"});
Attribute attr = attrs.get("MX");

Filed under: Java Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

You must be logged in to post a comment.

No trackbacks yet.

 

September 2009
M T W T F S S
« Aug   Oct »
 123456
78910111213
14151617181920
21222324252627
282930  

Categories

Pages