Menu
I have tried to use both of these scripts for a random redirect but they both produce the following error. Does anyone see anything wrong with them?
[QUOTE]
Parse error: syntax error, unexpected T_STRING in links-index.php on line 6
[code=php]<?php
$urls = array(“www.site1.com”,
“www.site2.com”,
“www.site3.com”);
$url = $urls[array_rand($urls)];
header(“Location: http://$url”);
?>
[code=php]
<?php
$sites = array(
‘http://www.google.com/’,
‘http://www.msn.com/’,
‘http://www.yahoo.com/’
)
header(‘Location: ‘.$sites[array_rand($sites)]);
die();
?>