Quote:
Originally Posted by woj
using array_rand is probably more straightforward... 
|
Certainly takes out some minor overhead by calling count() manually for each parse. I'd suggest this as well for something as simple-tarded as mentioned.
Code:
<?php
$urls = array(
'http://www.google.com',
'http://www.msn.com',
'http://www.bing.com',
'http://www.webcrawler.com',
'http://www.dogpile.com',
);
header("location: ". array_rand(array_flip($urls), 1));
?>