PHP Software “madking-cc-browsemedia”

  • PHP Code to stream mp3, wav and ogg audio files from webserver.
  • GUI Target: Keep it as simple as possible.
  • Audio files located inside filesystem of the remote server.

Versions

  • nocdn: External Libraries included
  • cdn: Libraries loaded external

Requires

  • mysql Database
  • Webserver (like apache2, nginx, …)
  • php
  • (ssh access to server)

Download

Howto

Step 1 Configure configure.php

"mediaroot"               => "/var/local/audio/",  // Path to your mp3 Files. Windows Example: "c:\media\audio\"
"mysql_database"          => "rex_browsemedia",    // The Database Name
"mysql_database_user"     => "rex_browsemedia",    // The Database User
"mysql_database_password" => "simple",             // The Database User Password
"mysql_host"              => "localhost",          // No need to change
"mysql_port"              => 3306,                 // No need to change
"mysql_table_name_data"   => "data",               // No need to change
"filetypes"               => array( "mp3", "ogg", "wav" ),  // Don't change it, (mayb3 in development)

Step 2 Create table and database user

mysql -u root -p
CREATE USER 'rex_browsemedia'@'localhost' IDENTIFIED BY 'yourpassword';
CREATE DATABASE rex_browsemedia CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON rex_browsemedia.* TO 'rex_browsemedia'@'localhost';
FLUSH PRIVILEGES;

utf8 should work with any cases.

Step 3 Upload files

Load code inside directory (configure webserver if needed, see duckduckgo.com)

Step 4 Fill Database

Execute update.php with cli

Do SSH Login
Example:

php /path/to/rex_browsemedia/update.php

See duckduckgo.com for executing php on command line

Wait till the command prompt returns. Could take 1-10 minutes.

Step 5 Open website

http://example.com/rex-browsemedia/

or

https://example.com/rex-browsemedia/

Step 6 Disable Debug

If everything works disable error and notice display in php.

See file config.php

Step 7 Password protect site

Use webserver integrated tools to password protect the site. See duckduckgo.com for details, if needed.

Everytime When files or directory structure changed

Execute update.php on command line.

Screenshot

Troubleshooting

It’s good to clear the database:

mysql -u root -p
TRUNCATE TABLE rex_browsemedia.data

and update the database:

php update.php

Workflow