返回列表 發帖

分享:使用 Javascript 簡單網頁自動分流方法

用呢個方法可以模擬大論壇網站用硬件做的分流

<SCRIPT language="javascript">
tim=1
setInterval("tim++",100)
b=1
var autourl=new Array()                 
autourl[1]="http://www.xxx.com/index.php"
autourl[2]="http://www2.xxx.com/index.php"  
function auto(url){
window.location.replace(url);
b++
}
function run(){
for(var i=1;i<autourl.length;i++)
document.write("<img src=http://"+autourl[i].split("//")[1].split("/")[0]+"/"+Math.random()+" width=1 height=1 onerror=auto('"+autourl[i]+"')>")}

run()

   </SCRIPT>

首先將寫個網頁,然後用以上的Javascript 插入,然後用呢個網頁做 index.html,

呢段 code 就會自動配合進入最快的分流網址

假設一部 server 多張獨立 Lan card IP,每個網頁都使用獨立 ip

就可以輕易做到分流

返回列表