function _start($category = FALSE, $args = '') { xspf_player::start($category, $args, TRUE); }
list($usec, $sec) = explode(' ', microtime()); mt_srand((double) $sec + (double) $usec * 100000); $nrows = count($tracks); for ($i = 0; $i < $nrows; $i++) { $j = mt_rand(0, $nrows - 1); // pick j at random $row = $tracks[$i]; // swap i, j $tracks[$i] = $tracks[$j]; $tracks[$j] = $row; } } foreach ($tracks as $row) { echo " <track>\n"; printf(" <location>%s</location>\n", xspf_player::entities($row['url'])); if ($row['artist'] != '' || $row['title'] != '') { printf(" <annotation>%s - %s</annotation>\n", xspf_player::entities($row['artist']), xspf_player::entities($row['title'])); } if ($row['imageurl'] != '') { printf(" <image>%s</image>\n", xspf_player::entities($row['imageurl'])); } if ($row['infourl'] != '') { printf(" <info>%s</info>\n", xspf_player::entities($row['infourl'])); } echo " </track>\n"; } } ?> </trackList> </playlist>