#1 (permalink)  
Old 04-26-2006, 04:52 PM
Registered User
 
Join Date: Feb 2002
Location: Oregon
Posts: 3
Passing Variables to an .asx file

I would like to find out the proper method for passing variables from a web document to an asx file.

What I want to do is pass a specific file name from a webpage to the playback .asx 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" />

I want to make 'mediafile' a variable (filename) and call it using a URL address link, like this -
http://domain.com/playback.asx?filename=mediafile

I am just learning about html headers and asx files so my knowledge level is very GREEN Can someone help explain how to do this?

Your help is much appreciated! Thank you....
Reply With Quote

  #2 (permalink)  
Old 04-26-2006, 05:24 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
I found this response in another set of forums that I found on Google:

Quote:
Hi,

This is very possible using PHP and Apache.

In the Apache configuration we add .asx files to
be processed by the PHP engine.

Simply like this:

AddType application/x-httpd-php .php .asx

Now you can write PHP code in you .asx files, thus
making the dynamic.

Here is a snippet that call an dynamic .asx file:
movie.asx?cat=hardcore&movie=072_twisted&scene=01& size=small

Here is a snippet of the dynamic movie.asx file:

foreach( $myScenes[0]->media as $media )
{
if( preg_match( "/\.wmv$/", $media ) )
{
echo "<entry>\n";
echo "<ref href=\"$media\" />\n";
echo "</entry>\n\n";
}
}

For me this works like a charm and am very pleased.

Hope this helps.
Best Regards
Rudi
I am guessing you will need to use htaccess files instead of actually editing your apache configuration, but you should be able to achieve the same result.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 04-26-2006, 05:38 PM
Registered User
 
Join Date: Feb 2002
Location: Oregon
Posts: 3
I hate Internet Explorer too - I'm with you!

Thanks for your reply....

It looks doable, I like using php - so I'm off to test it out!

Thank you,

Jami
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
passing information from 1 form to another amanxman Programming and Scripting 3 04-12-2006 04:59 PM
Creating a file and saving it locally - PHP curtiss Programming and Scripting 6 03-25-2006 12:26 PM
adding variables question -easy (for those in the know!) highab Programming and Scripting 0 01-24-2006 07:30 AM
Passing Variables to an .asx / .asp file Engineering Programming and Scripting 2 09-27-2005 01:34 PM
help with variables (GET variables?) katemotter Programming and Scripting 3 06-14-2005 02:55 PM


All times are GMT -5. The time now is 05:53 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter