21,892
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
<?php
function createNonceStr($length = 8) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$str = "";
for ($i = 0; $i < $length; $i++) {
$str .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
}
return $str;
}
?><meta http-equiv="refresh"
content="0;url=http://<?php echo createNonceStr() ?>.xxxxx.com/x/index.php">
我现在暂时是用这个跳转
但是用户访问的是一次性的 随机.xxxxx.com
怎么才可以让用户访问一次随机就变化一次 内容都在x/index.php 里