网页URL:[url]http://txazo.iteye.com/blog/1669205[/url]
IP地址:118.186.66.50
端口号:80
这种方法可以快速提升网站的访问量。
IP地址:118.186.66.50
端口号:80
public class HttpSender {
private static byte[] request = null;
static {
StringBuffer temp = new StringBuffer();
temp.append("GET http://txazo.iteye.com/blog/1669205 HTTP/1.1\r\n"
);
temp.append("Connection: keep-alive\r\n");
temp.append("Cache-Control: max-age=0\r\n");
temp.append("\r\n");
request = temp.toString().getBytes();
}
public static void sendHttpRequest() throws Exception {
Socket socket = new Socket("118.186.66.50", 80);
OutputStream os = socket.getOutputStream();
os.write(request);
os.flush();
os.close();
socket.close();
}
}
public class HttpThread implements Runnable {
@Override
public void run() {
try {
HttpSender.sendHttpRequest();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class HttpClient {
public static void main(String[] args) throws Exception {
for (int j = 0; j < 10; j++) {
for (int i = 0; i < 20; i++) {
new Thread(new HttpThread()).start();
System.out.println(20 * j + i);
}
Thread.sleep(1000 * 10);
}
}
}
这种方法可以快速提升网站的访问量。

4602

被折叠的 条评论
为什么被折叠?



