Location: PHPKode > projects > Mummi (Multi-user MOD_MP3 Interface) > mummi.0.6/htroot/mp3stream.php
<?
include "common.php";
if($sig || $song){
	include "$GLOBALS[lib_path]/audio-db.inc";
	$a = new AUDIO_DB;
	$a->connect("$GLOBALS[dbhost]","$GLOBALS[dbusername]","$GLOBALS[dbuserpassword]","$GLOBALS[dbname]");
	$m = new SWFMovie();
	$m->setDimension(1200,60);
	$m->setBackground(0x99,0x99,0x99);
	if($sig){
		$p = $a->pull_md5path_to_filepath($sig);
		$q ="SELECT mp3_fps,mp3_frames ".
				"FROM mp3_files ".
				"WHERE path_md5='$sig'";
		$f = $a->fetch_numeric($q);
		$fps = $f[0][0];
		$frames = $f[0][1];
		$m->setRate($f[0][0]);
		$m->streamMp3("$p");
		$m->setFrames($f[0][1]);
	}elseif($song){
		$rr_path = stripslashes(rawurldecode($r_path));
		$rr_song = stripslashes(rawurldecode($song));
		$p = "$GLOBALS[audio_folder]/$session_array[user_name]$rr_path/$rr_song";
		//$sig = md5($p);
		$q ="SELECT mp3_fps,mp3_frames ".
				"FROM mp3_files ".
				"WHERE path_md5='$sig'";
		$f = $a->fetch_numeric($q);
		//$fps = $f[0][0];
		//$frames = $f[0][1];
		$m->setRate($f[0][0]);
		$m->streamMp3("$p");
		$m->setFrames($f[0][1]);
	}
	header('Content-type: application/x-shockwave-flash');
	$m->output();
}
?>
Return current item: Mummi (Multi-user MOD_MP3 Interface)