论坛首页 » Java,C/C++,Shell,Php,Web 交流区 » Web开发 » [原创]提高页面的访问量
RSS WAP
统计:回贴:0   阅读:146   最后更新:2007-03-02 00:00
标题: [原创]提高页面的访问量
iwlk

头衔:灭天使者
等级:一级用户
精华:40
帖子:41 / 26
积分:0

在线时间:2143分
注册时间:2007-01-01 00:00
最后登录:2008-01-19 15:27
鲜花(24)   鸡蛋(51)
#1
[原创]提高页面的访问量
<%
//方法1:
java.util.Random random=new java.util.Random();
java.lang.Thread t=java.lang.Thread.currentThread();
java.lang.Runtime r=java.lang.Runtime.getRuntime();
String url="http://link.c06.net";   //提高访问量的页面
while(true)
{
  java.lang.Process p=r.exec("C:/Program Files/Internet Explorer/IEXPLORE.EXE "+url);//打开IE浏览器
  t.sleep(1000L*random.nextInt(50));
  p.destroy();//关闭IE浏览器
  t.sleep((long)random.nextInt(1000*2));
}


//方法2:
java.lang.Thread t=java.lang.Thread.currentThread();
String url="http://link.c06.net";     //提高访问量的页面
while(true)
{
java.net.URL obj=new java.net.URL(url);
java.io.InputStream is=obj.openStream();
is.read(new byte[1024]);
is.close();
t.sleep(1000L*10L);
}


//方法3:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>第六世纪http://site.c06.net/ </title>
<meta http-equiv="refresh" content="10">
</head>
<body>
<iframe src="http://link.c06.net" ></iframe>
</body>
</html>

%>

搜索更多相关主题的帖子:
发表于:2007-03-02 18:45