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

include("global.php");
include("function.php");

### rm.php ###
// sends an rm (real media) video playlist file with links to the selected
// audio file(s)

// sets url encoded and decoded variables for the rest of the script
if(!$cdir) { $cdir = ""; }
$cdir_url = rawurlencode(stripslashes($cdir));
$cdir = stripslashes(rawurldecode($cdir));

// These lines are ESSENTIAL for the brunhilde server to remain secure
// They keep a client from entering "../" to gain access to files
// outside of your web tree
if((substr_count($cdir, "../") > 0) || (substr_count($cdir, "..\\") > 0)) {
  include("security.php");
  }

$play = rawurlencode(stripslashes("$play"));
if($PLAY_DIR != "") {
  $url = "$DOMAIN$PLAY_DIR"."play.php?play=$play&base=$base";
  }
else { $url = "$SCRIPT_URL/play.php?play=$play&base=$base"; }

header("Content-Disposition: filename=\"Brunhilde.ram\"");
header("Accept-Range: bytes");
header("Content-Length: ".strlen($url));
header("Content-Type: audio/x-pn-realaudio");
print $url;

exit;
?>
Return current item: Brunhilde Media Server