whois in jsp (我在网上找的,充实一下这里)

<%@page import="java.io.*,java.net.*"%>

<%

Socket whois=new Socket("whois.networksolutions.com",43);

InputStream in=whois.getInputStream();

DataOutputStream data_out=new DataOutputStream(whois.getOutputStream());

data_out.writeBytes("yahoo.com\r\n");

int d;

while(true){

d=in.read();

if(d<0)

break;

out.print((char)d);

}

data_out.close();

in.close();

%>
   【问题提问、论坛交流】编辑:xker.com