Zufalls Links
Script: |
<?php
/**
* Zufallslinks ausgeben
*/
$url_list = array(
'http://www.spiegel.de',
'http://www.heise.de',
'http://www.zeit.de',
'http://www.sopos.org',
'http://www.nytimes.com',
'http://www.google.de',
'http://www.heisec.de',
'http://www.dreamcodes.de',
);
$nbr2get = 3;
srand ((double)microtime()*1000000);
shuffle ($url_list);
$some_random_urls = array_slice($url_list, 0, $nbr2get);
foreach($some_random_urls as $one_url){
printf('<a href="%s">%s</a><br>', $one_url, $one_url);
}
?>
|
|