php代码|随便跳转到指定网址(php跳转到指定网页代码)
时间:2023-06-07 16:05:42 阅读:481
利用php代码,随机跳转到设定好的网址
PHP
<?php
// 定义要跳转的网址数组
$urls = array(
"http://156.226.20.208/page1",
"http://156.226.20.208/page2",
"http://156.226.20.208/page3",
"http://156.226.20.208/page4"
);
// 随机选择一个网址
$random_url = $urls[array_rand($urls)];
// 跳转到随机选择的网址
header("Location: " . $random_url);
exit;
?>
网友评论