網站刷點擊量工具(JS)

        有個時候網站要刷一刷流量,但是直接改數據庫的話可能很難找,一般的後臺也沒有提供這個功能。所以,這個神奇的工具就誕生了。
原理:
        通過不斷的更改 iframe 框架的 src 屬性來達到目的。但是每次更改的時候可能在一更改之前網頁沒有加載完,這就造成一個問題,大部分網站的計流量的JS都是放在尾部的(後臺自動生成居多)。所以要監聽事件,當上一次刷的頁面加載完了再刷。非IE內核瀏覽器都支持一個onload 的時間,在iframe加載完的時候激發。
而在ie內核的瀏覽器中則要監聽 readyState 來實現,比較麻煩。這裏就不給出了,可以百度。恨死IE了。
       一個用於加載的的框架
<iframe src="" height="200" width="994" id="myiframe" style=" display:none;"></iframe>
 
全部代碼
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>網站刷點擊量工具</title>
<style>
.main{ height:200px; margin:0px auto; padding:0px; width:500px; font-size:14px; line-height:24px;}
a img{ border:none;}
a { font-size:14px; color:#00f; text-decoration:none;}
a:hover{ text-decoration:underline;}
</style>
</head>
<body>
<div class="main">
<em>網站刷點擊量工具 By <a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=yPr9_P7__fj__oi5uearp6U" >Heister</a></em><br />
<em>請使用火狐瀏覽器或者谷歌瀏覽器,否則沒有效果</em><br />
<em>速度取決於你的網速</em><br />
頁面url:<input type="text" id="weburl" name="weburl" value="" size="35" /><br />
要增加的點擊次數:<input type="text" id="hitcount" name="hitcount" value="0" size="5" /><br />
<input type="button" value="開始刷" onclick="shua();" /> <a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=yPr9_P7__fj__oi5uearp6U" >意見反饋</a><br />
<span id="jindu"></span>
</div>
<iframe src="" height="200" width="994" id="myiframe" style=" display:none;"></iframe>
<script type="text/javascript">
var mf= document.getElementById('myiframe');
var weburl = document.getElementById('weburl');
var hitcount = document.getElementById('hitcount');
var jindu = document.getElementById('jindu');
var count_add=0;
/*
mf.onloadeddata=function(){
	if(count_add!=0){
		count_add--;
		mf.src=weburl.value;
	}
}*/
mf.onload=function(){
	if(count_add>0){
		count_add--;
		mf.src=weburl.value;
		jindu.innerHTML="進度:"+ ( hitcount.value-count_add)/hitcount.value*100+"%";
	}else{
		jindu.innerHTML="進度:100%";
	}
}
function shua(){
	count_add=  hitcount.value*1;
	if( isNaN(count_add) ){
		alert("次數請輸入數字!");
		return ;
	}
	
	if(count_add>500){
		alert("請輸入小於500的數字!");
		return ;
	}
	if( count_add==0) return ;
	count_add--;
	mf.src=weburl.value;
}
</script>
</body>
</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章