= count($urls)){ $url_index = 0; } // 跳转到指定网址 header('Location: '.$urls[$url_index]); // 更新cookie中的网址索引 setcookie('url_index', $url_index+1, time()+3600); } else { // 如果没有设置cookie,跳转到第一个网址 header('Location: '.$urls[0]); // 设置cookie中的网址索引为1,因为已经访问了第一个网址 setcookie('url_index', 1, time()+3600); } ? 用PHP写一个每次访问网站按顺序跳转到指定网址使用cookie功能

原文地址: http://www.cveoy.top/t/topic/f4l5 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录