Location: PHPKode > projects > Brunhilde Media Server > brunhilde/global.php
<?php

### global.php ###
# Workaround
if(!ini_get("register_globals")) {
    import_request_variables("GPC");
}

// Modify these variables accordingly
// NOTE: windows users must replace all instances of a 
// backslash "\" when making directory calls to a forward
// slash "/".

// Array of directories where the media files are stored
// (include trailing slash).  
// if only one directory is entered, Brunhilde will
// begin inside of that directory
$MEDIA_DIR = array(
array('MP3 Files', '/mp3/')
#,array('MP3 Files', 'c:/stuff/mp3s/'), //windows
#,array('Video Files', '/home/guest/pub/Movies/')
);

// Directory where uploaded files will be placed
// Often, it is a good idea to put this somewhere in your
// media tree.  This way, users have immediate access to
// their uploads.  (include a trailing slash)
// NOTE: your web server's user MUST have write permission
// to this directory for this option to work!
// (leave it blank if you want to disable file uploads)
#$UPLOAD_DIR = "/home/guest/pub/mp3s/upload/";
$UPLOAD_DIR = ""; // disables this option

// this variable dictates the maximum (in MB) filesize of songs that
// may be uploaded to the server.  This feature keeps you from
// having to globally alter your php.ini file.
### Note: this variable is not yet implemented ###
# The only way to set your upload size beyond the default 2 mb is to
# set your 'upload_max_filesize' variable manually in your php.ini
# file, and then restart your web server
$UPLOAD_SIZE = "30M";
###

// This is the domain of your server. An ip address may also be used
// (include trailing slash and http://)
$DOMAIN = "http://www.mydomainname.com/";

// Directory (from the root web directory) where the script will be
// Note: this is a url and should use forward slashes
// (no beginning slash - no trailing slash).
$script_dir = "brunhilde";

// The URL to the server followed by $script_dir
// You don't need to change this.
$SCRIPT_URL = "$DOMAIN$script_dir";

// This option will check either the file extension
// (.mp3, .mp2, or .mpg - case insensitive)
// or the 3 ascii character identifier at the beginning of the file.
// This option keeps brunhilde from serving non-mp3 filetypes that
// exist in the mp3 structure
// NOTE:  Option #2 is slower than option #1, but may be better
// for macintosh users without extensions
// ( 0 = filter off, 1 = check extensions, 2 = check ascii identifier )
#$FILTER = "0";
$FILTER = "1";
#$FILTER = "2";

// *** These options allow you to add support for any file type that
// You want besides regular mp3 audio files.  You do not need to modify
// Them unless you want to support other file formats. ***

// This 2 dimensional array stores supported audio filetypes.
// Format: | file extension | file descriptor | mime-type | playlist script |
// The file descriptor is usually the first 2 or 3 characters of a file
// the mime-type is what will be sent to the browser to identify its filetype
// the playlist script is the php script file that sends the actual playlist
$AUDIO_TYPE = array(
  array('mp3', 'id3', 'audio/x-mp3', 'm3u.php'), // support for mp3 files
  array('mp2', 'id3', 'audio/x-mpeg', 'm3u.php'), // support for mpeg layer2 files
  array('ogg', 'id3', 'application/x-ogg', 'm3u.php'), // support for ogg files
  array('flac', 'id3', 'application/x-flac', 'm3u.php'), // support for flac files
  // NOTE! Wave files are not linear, and therefore will not stream
  #array('wav', 'wav', 'audio/x-wav', 'm3u.php'), // support for wave files
  );

// This option holds supported video formats
// uncomment this variable to enable video formats
// format is exactly like the above 'AUDIO_TYPE' array
// comment out this entire section to disable video filetypes
###
$VIDEO_TYPE = array(
  array('mpg', 'mpg', 'video/x-mpeg', 'asx.php'), // mpeg video support
  array('mpeg', 'mpg', 'video/x-mpeg', 'asx.php'), // alternate mpeg extension
  array('avi', 'avi', 'video/avi', 'asx.php'), // avi video format support
  array('asf', 'asf', 'video/x-ms-asf', 'asx.php'), // asf video format support
  array('divx', 'divx', 'video/mpeg', 'asx.php'), // divx extension support
  array('rm', '.rm', 'audio/x-pn-realaudio', 'rm.php'), // real media support
  array('ram', '.rm', 'audio/x-pn-realaudio', 'rm.php'), // alternate real media extension
  array('mov', 'mov', 'video/quicktime', 'embed.php'), // quicktime file format support
  array('qt', 'mov', 'video/quicktime', 'embed.php'), // quicktime alternate extension
  );
###

// This Variable Enables an option that will display images (jpg, gif, bmp)
// at the top of the page, found inside the current directory
// NOTE: $FILTER must be set to either 1 or 2 for this option to work
// works just like the above 2 arrays.  Browser must support each image type.
// Comment this entire section out if you wish to turn this option off
###
$IMAGE_TYPE = array(
  array('jpg', 'jpg', 'image/jpg'), // jpeg image support
  array('gif', 'gif', 'image/gif'), // gif image support
  array('bmp', 'bm', 'image/bitmap'), // bitmap image support
  );
###

// This variable enables an option which allows users to download each
// particular song instead of streaming it in directly to the mp3 player.
// A "0" here will disable this option, a "1" will enable it
$DOWNLOAD = 1;

// This variable lets you choose which ID3 version you want to have priority
// Brunhilde will look for an entry in the chosen version for each individual
// field.  If nothing is found, it will fall back to the other version before
// displaying an 'N/A'.  1 = ID3v1, 2 = ID3V2
$ID3_VERSION = 2;
#$ID3_VERSION = 1;

// This variable should be set if you plan to safeguard your
// brunhilde server with a .htaccess file.  This option is for users who's
// MP3 players do not do http authentication. This should point to the
// unprotected web directory of your play.php script You will also need to move
// your play.php file.  See 'docs/INSTALL' for more information
// to turn this option off leave it "";
// (no beginning slash - include trailing slash)
#$PLAY_DIR = "services/misc/";
$PLAY_DIR = "";

#
//  ### Theme Scripting ###  //
#

// points to the name of the directory where you wish the themes to reside
// (in relation to the main brunhilde directory URL - include trailing slash)
$THEME_DIR = "themes/";

// filesystem path to the themes directory (include trailing slash)
$THEME_PATH = "/var/www/html/brunhilde/themes/";
#$THEME_PATH = "c:/web/brunhilde/themes/";

// if you wish to use another theme as the default theme, change this variable
// to the name of the folder containing the theme that you wish to make default
// (no trailing slash)
$DEFAULT_THEME = "default";

// Queries the client's browser for a chosen theme cookie, if no theme is found
// the default theme is chosen instead.
if (isset($_REQUEST["CLIENT_THEME"])) $CLIENT_THEME = $_REQUEST["CLIENT_THEME"];
if(!isset($CLIENT_THEME)) { $CLIENT_THEME = "$DEFAULT_THEME"; }
else { $CLIENT_THEME = stripslashes($CLIENT_THEME); }

// pulls all of the information form the chosen theme package
include("$THEME_DIR$CLIENT_THEME/theme.php");

### // These Variables Display Information on the 'stats.php' page. // ###

// brunhilde source version
$BRUNHILDE_VERSION = "2.3.1";

// name of your os (ie. linux, mac, windows)
$OS_NAME = "Linux";
#$OS_NAME = "Windows";

// Operating System Release (i.e. 98SE, 2.4.6, ME)
$OS_RELEASE = "2.4.17";

// Have a nice Day.
?>
Return current item: Brunhilde Media Server