4. 把那些网址装进一个数组里,用shuffle()随机打乱它们的顺序,随便选择一个输出一个数组元素就好了
5. 就像这样 $a=array(1,2,3,4); shuffle($a); echo $a[0];
6. 1.建立一个文件url.txt写入要跳转的地址,每一个换行相当于一条
比如:
http://hu60.cn(换行)
http://3gxk.net最后一条不加换行!
2.建立文建url.php
<?php
$f=file(dirname(__file__)."/url.txt");
$an=count($f)-1;
$n=rand(0,$an);
?>
<meta http-equiv="refresh"content="0;
url=< ?php echo $f[$n]; ?>">
本人新手,未试这个能不能行,自测
8.
<?php
$d = array(
"
http://baidu.com",
"
http://hu60.cn",
"
http://know.com",
"
http://mmm.com"
);
shuffle($d);
?><html>
<head>
<meta http-equiv="refresh"content="5;url=<?=$d[0];?>">
</head>
</html>