diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2018-03-11 20:10:17 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2018-03-11 20:10:17 -0400 |
| commit | 0402389cc865e67fe5f6dc8dac766de1513ff306 (patch) | |
| tree | 4e463eb3d73259872a291bbd94bcef311bf190b3 /page.php | |
| parent | 0026ca48c2800425ea5018b2626c390114aea68f (diff) | |
| download | prosongsa-0402389cc865e67fe5f6dc8dac766de1513ff306.tar.gz | |
* Song Suggestions: Seed random numbers by current minute
(for better group song selection)
Diffstat (limited to 'page.php')
| -rw-r--r-- | page.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/page.php b/page.php index cdc7921..ef8f6d8 100644 --- a/page.php +++ b/page.php @@ -69,6 +69,8 @@ function refToNum( $ref ) */ function load_song( $number, $transp = 0 ) { + // Song suggestions are based on the minute you loaded the page + mt_srand( time()/60 ); $handle = fopen("inputfile.txt", "r"); if( ! $transp ) $transp = 0; @@ -93,7 +95,7 @@ function load_song( $number, $transp = 0 ) { $allsongs[$matches[1]] = $line; $current_song = $matches[1]; - if( rand(0,100) < 5 ) + if( mt_rand(0,100) < 5 ) { $suggestedSong[$current_song]['title'] = $line; } |
