随机跳转源码~简单

2019-12-30 19:48:36 -0500
<script language=javascript>
i = parseInt(Math.random()*10)
switch(i) {
case 0:location.href='http://www.baidu.com';break;
case 1:location.href='http://www.ppzhu.tv/';break;
case 2:location.href='http://dy10.mhzsyy.cn/';break;
case 3:location.href='http://movie.feimayi.net/';break;
case 4:location.href='http://www.hadaomeng.com/';break;
case 5:location.href='http://m.zhanshengcheng.com/';break;
case 6:location.href='https://m.xiaoyaojing.tv/';break;
case 7:location.href='http://www.frenyy.com/';break;
case 8:location.href='http://tebyy.com/';break;
case 9:location.href='http://749b.com/';break;
}
</script>
<?php
<%
file=server.mappath("url.txt") '网址列表路径
set fs=server.createobject("scripting.filesystemobject") 'fso读写组件
set txt=fs.opentextfile(file,1,true) '打开
if not txt.atendofstream then p=split(txt.readall, vbcrlf) '分割为数组

randomize '纯随机,不重复
response.redirect p(int((ubound(p) * rnd) + 1)-1) '在(1-数组最大上标)之间生成随机数,并跳转到该页
response.end '结束
%>
演示 http://go.2sm.xyz/go1.php
«Newer      Older»
Comment:
Name:

Back to home

Subscribe | Register | Login | N