php如何自动跳转到随意网址?

解决方案 »

  1.   

    <script>location.href=$url_arr[1]</script>
      

  2.   

    $arr = array("http://www.baidu.com","http://www.google.com","http://www.facebook.com");
    shuffle($arr);
    for($i=2;$i<=$arr;$i++){
    echo "<a href=\"$arr[$i]\">".$arr[$i]."</a> <br />";
    }谁能告诉我这段代码为什么这么卡?
      

  3.   

    <?php
    $url = array('http://baidu.com','http://google.com','http://bi68.cn');
    header('Location: '.$url[mt_rand(0,2)]);
    ?>
      

  4.   


    $arr = array("http://www.baidu.com","http://www.google.com","http://www.facebook.com");
    header('Location: '.$arr[array_rand($arr)]);