Posts: 4
Location: Right here in front of my Computer
|
First: What I'm trying to do -
I want to pass a specific file name from a webpage to the playback.asx file, where the filename varies but the rest of the .asx file remains the same.
Inside the .asx file (playback.asx) there is a path to get the file:
<REF "http:domain.com/dir/mediafile.wma" />
I want to make 'mediafile' a variable (filename) and call it using a URL address link, like this -http://domain.com/dir/plaback.asx?filename=file.wma
Second: I read where I could do this using php -
By assigning a mine type (using htaccess) like this -
Code:
AddType application/x-httpd-php .php .asx
I am suspose to be able to now use php in an asx file..... {interesting  }
Not being familuar with headers and php here is my best guess at this php/asx file - Where medianame is the variable containing my passed media file name.
Code:
foreach( $mediafile[0]->media as $medianame )
{
if( preg_match( "/\.wma$/", $medianame ) )
{
echo "<asx version = "3.0">\n\n";
echo "<entry>\n";
echo "<ref href=\"mms://www.domain.org/WMA/$medianame\" />\n";
echo "<ref href=\"http://www.domain.org/WMA/$medianame\" />\n";
echo "</entry>\n\n";
echo "</asx>\n";
}
}
Can anyone who knows something about this give me their advise?
Thank you very much!
|