Hi,
I'm just starting to use/learn PHP, and I have question.
On my site I want a "URL of the day", and I use this code to select one random line in the file "linker".
<?php
// srand(time());
$linklist = file( "linker");
$nlink = sizeof($linklist);
$rlink = rand(0,$nlink-1);
$link = $linklist[$rlink];
echo $link;
?>
The "problem" with this is that it is not random enough, 1/3 of the times the first line in the file is displayed.
The file "linker" is only 16 lines long at this moment.
Is there a solution to this "problem"?
(if you recognize the code, you are correct, it is partialy "stolen")
The site is at http://home.no.net/shorts/ but it is in Norwegian.
Regards Thomas Schulzki