Advanced Stream Redirector


Hits: 2744  

The Advanced Stream Redirector (ASX) format is used to store playlist of Windows Media files for a multimedia presentation using HTTP, RTSP and MMS streaming protocols.

ASF (Advanced Streaming Format) is a streaming media format developed by Microsoft. ASF files contain video, audio, slide shows and synchronized events for WMV files.

* The ASF file is media file, containing video, audio, etc.
* The ASX file is a metafile contains data about another file.

<asx version="3.0">
  <title>Video Live Stream</title>
 
  <entry>
    <title>SVNLabs Main Stream</title>
    <ref href="http://www.svnlabs.com/vod/media.wma" />
    <param name="aParameterName" value="aParameterValue" />
  </entry>
 
  <entry>
    <title>SVNLabs Radio</title>
    <ref href="http://www.svnlabs.com:8080" />
    <author>SVNLabs.com</author>
    <copyright>©2012 SVNLabs.com</copyright>
  </entry>

</asx>

PHP Advanced Stream Redirector

<?php

header("Content-Type: video/x-ms-asf;"); 

$title = isset($_REQUEST['title'])?$_REQUEST['title']:"";
$author = isset($_REQUEST['author'])?$_REQUEST['author']:"";
$file = isset($_REQUEST['file'])?$_REQUEST['file']:"";


echo "<asx version=\"3.0\">";
  echo "<title>".$title."</title>";
  echo "<entry>";
    echo "<title>".$title."</title>";
    echo "<author>".$author."</author>";
    echo "<ref href=\"http://www.svnlabs.com/vod/".$file."\"/>";
  echo "</entry>";
echo "</asx>";



?>

Demo: http://www.svnlabs.com/vod/vod.php?title=SVNLabs&author=SVNLabs&file=QFTkJ4gPbk9kiQhmhxmnqw.wmv