FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » randomly sorting files in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: randomly sorting files in php [message #180593 is a reply to message #180578] Mon, 04 March 2013 10:45 Go to previous messageGo to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Mar 1, 1:49 am, Cal Dershowitz <c...@example.invalid> wrote:
> Hello ng,
>
> I've got a working localhost and a couple php scripts that run so far,
> so I wanted to see what types of things I can do and cannot do.  This is
> by no means clear to me to me now.
>
> What I have is a collection of my own music files that I have put in the
> path of where localhost is looking for things; with my default install,
> that is /var/www.
>
> I wrote a bash script to export the files off my mp3 player, because
> neither my gf nor I who bought these things can figure how to make them
> play randomly.  Yes we have achieved a certain age, where determination
> makes up for a lot.
>
> $ cat music1.sh
> #!/bin/bash
>
> set -e
> FROM='CCE0-705F'
> DIR='music1'
> mkdir -p $DIR
> cp  $FROM/*.wma $DIR/
> cp  $FROM/*.mp3 $DIR/
> cd $DIR
> ls -l
> exit 0
> $
>
> So does php have a way to do this that is as simple as it might be in
> perl, for example?
> --
> Cal

Do you know what order the mp3 player uses to decide the order of
play? If for instance it plays in alphabetical order of file name,
then the only way to get them played randomly is to rename them. On
the other hand it could be based on the order in which they are copied
to the device.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to avoid the use of session variables in this script
Next Topic: all done
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 21:53:04 GMT 2024

Total time taken to generate the page: 0.05205 seconds