Hi Eric:
Because apache does not filter what is being displayed and if there is
way I do not know how to do it. 

I have all my music projects in the same directory. This includes .mid
and .wav files among others. I need to be able to export the directory
tree to the web server only when needed and there are thousands of files
so the script makes it very practical and also displays the files in one
page. In addition, files are constantly being created and modified as
new recordings are created or edited. So there, I am a musician! and a
tired one. I just played the ever lasting Brahms German Requiem; never
ever submit yourselves to that torture. I once said that I would never
play this piece again. Unfortunately, I am sure I will have to do it
again.

take care,

Alvaro Zuniga
On Thu, 2004-03-18 at 10:02, Eric G Ortego wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Alvaro Zuniga wrote:
> 
> | Hi Everyone: A fried visited me today and we had a few drinks. He
> | listened to some of my music and asked me if I could possibly
> | display it online for him to download. After he left, I wrote this
> | algorithm that is very short thanks to the power of recursion. I
> | just wanted to shae it.
> |
> | For the computer scientists out there, yes I know about the
> | recursion so show your alternative :-)
> 
> 
> Why not use apaches internal directory indexing?
> I do this,    
> 
> Alias /music/ "/var/space/public/mp3/"
> 
> ~    <Directory "/var/space/public/mp3/">
> ~        AllowOverride None
> ~        Options Indexes IncludesNoExec
> ~        AddHandler type-map var
> ~        Order allow,deny
> ~        Allow from all
> ~    </Directory>
> 
> 
> browseing http://www.me.com/music/
> will give me a hyperlink'd list of everything in that directory unless
> I add an index file.
> It also recurses the directory tree Indexing.
> Often I just softlink things here I want to give access to, apache
> spews errors about links not being allowed but since it works and is
> only temporary for me I ignore the errors.
> 
> |
> | enjoy,
> |
> | Alvaro Zuniga
> |
> | <?php global $path; $path = ''; rec_index( $file ); function
> | rec_index( $file ) { global $path; if( is_file( $file ) ) { $mp3 =
> | explode( '.', $file ); if( $mp3[count( $mp3 ) - 1] == 'mp3' ) {
> | echo '<a href="' . $path . $file . '">' . $file . '</a><br>'; } }
> | elseif( ( is_dir( $file ) && $file != '.' && $file != '..' ) ||
> | $file == '' ) { $path .= $file . '/'; if( $file ) chdir( $file );
> | echo '<b>' . $file . '</b><br><blockquote>'; $handle = opendir( '.'
> | ); while( ( $file = readdir( $handle ) ) !== false ) { rec_index(
> | $file ); } chdir( '..' ); echo '</blockquote>'; } } ?>
> |
> |
> | _______________________________________________ General mailing
> | list [email protected]
> | http://brlug.net/mailman/listinfo/general_brlug.net
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFAWcgu6JFKsKsJemQRAkEqAKCYQbbqJtOUqcOsQ/c1aCMk/3pLEACeLwQF
> AMa2A2CGfFSK6pO7bT8aI+4=
> =uKAO
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://brlug.net/mailman/listinfo/general_brlug.net

Reply via email to