<%@ page contentType="text/html;charset=gb2312"%>
<%
String sCurrentLine;
String sTotalString;
sCurrentLine="";
sTotalString="";
String temp="";
java.io.InputStream l_urlStream;
for(int i=14;i<=22;i++){
java.net.URL l_url = new java.net.URL
("http://www.dltcedu.org/index_5/html/994"+i+".shtml");
java.net.HttpURLConnection l_connection = (java.net.HttpURLConnection)
l_url.openConnection();
l_connection.connect();
l_urlStream = l_connection.getInputStream();
java.io.BufferedReader l_reader = new java.io.BufferedReader(new
java.io.InputStreamReader(l_urlStream));
int start=-1;
while ((sCurrentLine = l_reader.readLine()) != null)
{
if((start=sCurrentLine.indexOf("<div style=\"overflow:hidden"))!=-1){
temp=sCurrentLine.substring(start,sCurrentLine.length());
sTotalString+=temp.replaceAll("/UploadFile","http://www.dltcedu.org/UploadFile");
break;
}
//sTotalString+=sCurrentLine;
}
while ((sCurrentLine = l_reader.readLine()) != null)
{
if((start=sCurrentLine.indexOf("</P></p></div>"))!=-1){
temp=sCurrentLine.substring(0,(start+14));
sTotalString+=temp.replaceAll("/UploadFile","http://www.dltcedu.org/UploadFile");
break;
}
sTotalString+=sCurrentLine.replaceAll
("/UploadFile","http://www.dltcedu.org/UploadFile");;
}
}//for
out.println(sTotalString);
%>