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

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

### asx.php ###
// sends an asx video playlist file with links to the selected video 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"));
header("Content-Type: video/x-ms-asx");
header("Content-Disposition: filename=\"Brunhilde.asx\"");
if($PLAY_DIR != "") {
  echo "$DOMAIN$PLAY_DIR"."play.php?play=$play&base=$base";
  }
else { echo "$SCRIPT_URL/play.php?play=$play&base=$base"; }

exit;
?>
Return current item: Brunhilde Media Server