如何用ASP代码检测ASP动态网址站中的死链接?人工一条条检测太累!!

来源:百度知道 编辑:UC知道 时间:2024/05/29 20:39:43
dhjyx 的程序我还看得不是很懂,能否再详细说明操作过程??

用抓网页程序,抓这个网页,抓来来,用正则表达式分析出地址来,跟据地址,再去抓,能抓到的就是不死的,否则就是死的,我写的程序如下:
/**
*
*/

/**
* @author Administrator
*
*/
public class Run {

/**
*
*/
public Run() {
super();
// TODO Auto-generated constructor stub
}

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int threadMember = 10;
if (args.length > 0)
threadMember = new Integer(args[0]).intValue();
System.out.print("共有 " + threadMember + " 个线程!\r\n");
for (int i = 0; i < threadMember; i++) {
ThreadManage threadManage = new ThreadManage(i);
Thread spiderThread = new Thread(threadManage);
spiderThread.setPriority(Thread.MAX_PRIORITY);
spiderThread.start();
}

}

}

public class ThreadManage implements Runnable {