应朋友所求想做一个连续点击的程序。 你直接用鼠标精灵好了,到google搜一下应该就有了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 QY鼠标精灵,XP漂亮鼠标精灵。是哪个? public static void main(String[] args){ try { int photoid = 4077; //图片id int speed = 5; //每5秒访问一次 URL url = new URL("http://panasonic.lycos.com.cn/g50/support.php?photoid=" + photoid); while(true) { HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.connect(); InputStream in = conn.getInputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[4096]; int bytes = 0; while((bytes = in.read(buf)) != -1) bos.write(buf, 0, bytes); conn.disconnect(); System.out.println(new String(bos.toByteArray())); Thread.sleep(speed * 1000); } } catch(Exception e) { e.printStackTrace(); System.exit(1); }} 你用application,并不需要打开浏览器像压力测试一样,狂请求就是了! 我是用vc写的,因为我不会java.也不会html.我尝试3,10,20,30,40个多线程,但速度只有100次一分钟。后来我想是不是他的服务器的响应太慢。我改成单线程。加了0.1秒的延时。速度可以到200次一分钟.这就奇怪了,他的服务器不可能一秒钟3次请求都不接受。中国这么大 一秒钟同时3个人点很正常。是不是他检测到同一个ip发过来。或者其他原因?那我能不能把发送之前的包截下来,把ip地址改掉(只是设想 完全不懂) F1帮助系统如何建立? 求一Java语法的分析器,要源代码,谢谢! “JAVA”的标准读法?! mysql的一个字段定义问题 怎么设置系统时间 关于JPopupMenu显示的文本问题!!! 如何获知局域网内的哪些机器是SQLSERVER数据库服务器 散分——怎么让鼠标显示漏斗表示等待? 高分求救---简单问题 众所周知,JPanel容器是JComponet的子类,那么JPanel和JComponent有什么区别 文件的读取问题 高手来说说关键字——synchronized
{
try
{
int photoid = 4077; //图片id
int speed = 5; //每5秒访问一次
URL url = new URL("http://panasonic.lycos.com.cn/g50/support.php?photoid=" + photoid);
while(true)
{
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.connect();
InputStream in = conn.getInputStream();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] buf = new byte[4096];
int bytes = 0;
while((bytes = in.read(buf)) != -1)
bos.write(buf, 0, bytes);
conn.disconnect();
System.out.println(new String(bos.toByteArray()));
Thread.sleep(speed * 1000);
}
}
catch(Exception e)
{
e.printStackTrace();
System.exit(1);
}
}
这就奇怪了,他的服务器不可能一秒钟3次请求都不接受。中国这么大 一秒钟同时3个人点很正常。是不是他检测到同一个ip发过来。或者其他原因?那我能不能把发送之前的包截下来,把ip地址改掉(只是设想 完全不懂)