Current location: Hot Scripts Forums » Programming Languages » PHP » Using PHP Echo in ASX Media Files


Using PHP Echo in ASX Media Files

Reply
  #1 (permalink)  
Old 05-26-05, 07:10 PM
sixflagsga sixflagsga is offline
Newbie Coder
 
Join Date: Sep 2004
Location: Atlanta, Georgia
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Using PHP Echo in ASX Media Files

I currently run a metafile code on my website to play different media files in a directory. I use
PHP Code:

<?php echo "$address?>

inside the URL for the media file so that depending on which file is pulled it it will pull up the related URL file.

I have tried to include the <?php echo "$address" ?> inside the ASX tags to incorporate that kind of thing, but it does not seem to work. I was curious if there was a way to get that code to work or if you could use two files inside the metafile code in the html. My goal is to create a playlist, and thus I need to use the <?php echo "$address" ?> code inside the playlist.

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-26-05, 07:46 PM
Jaffizzle Jaffizzle is offline
Newbie Coder
 
Join Date: May 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Ok bare with me, i dont know too much about embedded players (if thats what you are referring to)

PHP Code:

<object id=....>

<embed type=.... src=<?php echo $address?>>
</object>
so is the code above similar to what you have minus all the extra stuff or are you talking about an actual *.asx file?

Sorry I dont know too much on the subject, but Im willing to learn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 05-30-05, 04:57 PM
sixflagsga sixflagsga is offline
Newbie Coder
 
Join Date: Sep 2004
Location: Atlanta, Georgia
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Sadly no. My current media player runs with the following PHP Code:

PHP Code:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="mp_2128831654" width="300" height="322"  

              CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"  
              standby="Loading Microsoft Windows Media Player components..."  
              TYPE="application/x-oleobject">
        <param name="AllowChangeDisplaySize" value="1">
        <param name="AutoRewind" value="1">
        <param name="Autosize" value="1">
        <param name="AutoStart" value="1">
        <param name="Balance" value="0">
        <param name="BufferingTime" value="3">
        <param name="ClickToPlay" value="1">
        <param name="DisplaySize" value="4">
        <param name="EnableContextMenu" value="1">
        <param name="EnableFullScreenControls" value="1">
        <param name="EnableTracker" value="1">
        <EVENT NAME="Adlink" WHENDONE="RESUME"> 
        <param name="Filename" value="http://www.sfogonline.com/sf360/videos/<?php echo "$address?>">
        <param name="Mute" value="0">
        <param name="PlayCount" value="1">
        <param name="ShowControls" value="1">
        <param name="ShowAudioControls" value="1">
        <param name="ShowDisplay" value="0">
        <param name="ShowGotoBar" value="0">
        <param name="ShowPositionControls" value="0">
        <param name="ShowStatusBar" value="1">
        <param name="ShowTracker" value="1">
        <param name="VideoBorderColor" value="0">
        <param name="VideoBorderWidth" value="0">
        <param name="Volume" value="-500">
        &quot; &quot;&gt; &quot;&gt; &quot;&gt; <embed TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download/" ID="MediaPlayer" Name="mp_2128831654" Width="300" Height="322" Src="http://www.sixflagsnews360.com/videos/<?php echo "$address?>"> 
AutoSize=&quot;1&quot; AutoStart=&quot;1&quot; ClickToPlay=&quot;1&quot; DisplaySize=&quot;0&quot; 
EnableContextMenu=&quot;1&quot; EnableFullScreenControls=&quot;1&quot; EnableTracker=&quot;1&quot; 
Mute=&quot;0&quot; PlayCount=&quot;1&quot; ShowControls=&quot;1&quot; ShowAudioControls=&quot;1&quot; 
ShowDisplay=&quot;0&quot; ShowGotoBar=&quot;0&quot; ShowPositionControls=&quot;0&quot; 
ShowStatusBar=&quot;1&quot; ShowTracker=&quot;1&quot; &gt;  
      </object>
My goal is to have the PHP Includes work in the following ASX code:

Code:
<ASX VERSION = "3.0">
<TITLE>SFOG Online</TITLE>
   <ENTRY>
      <REF HREF = "domain.com/media/ad.wmv" />
   </ENTRY>
   <ENTRY>
      <REF HREF = "<?php echo "$address" ?>" />
   </ENTRY>
 </ASX>
Yet, when you put that in action it allows the ad to work (since it is a Windows media file, but the $address won't work. Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 05-31-05, 03:40 AM
Jaffizzle Jaffizzle is offline
Newbie Coder
 
Join Date: May 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
i dont believe ASX or any media files can parse PHP

Like i said, i havent worked too much with media..but ill definately dig some research into it when i have the time. Ill see if I can figure out a possible work around.

Its kinda interesting honestly

So ill get back to you.

---------------edits-----------------
Ok i dont think it was too hard to learn..however i noticed some things..

<embed TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download/" ID="MediaPlayer" Name="mp_2128831654" Width="300" Height="322" Src="http://www.sixflagsnews360.com/videos/<?php echo "$address" ?>">

assuming your code works
$address = "blahblah.asx"; //playlist file right?

inside your blahblah.asx file
<ENTRY>
<REF HREF="blahblah.asx";
</ENTRY>

shouldnt the HREF be set to a media type that isnt itself?

so even if ASX would be able to parse PHP the code would still be flawed..

If im wrong please correct me, hehe im still learning this.

Last edited by Jaffizzle; 05-31-05 at 03:59 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 06-02-05, 07:38 AM
lawrencesuniga lawrencesuniga is offline
New Member
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
try this i found this on another forun

----------------------------------------------------

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";
}
}


--------------------------------------------------

please message me or email me (las@cybees.com) if it works, i havent tried it yet
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 06-02-05, 04:12 PM
Jaffizzle Jaffizzle is offline
Newbie Coder
 
Join Date: May 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
oh hey thats pretty cool, never would of thought of that!

i feel stupid now

i forgot practically any file type should be able to parse php as long as you set it up in apache.

im getting too old -___-"

Thanks! I feel a lil smarter now, i hope sixflags comes back to see what you found.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 11-04-05, 10:08 PM
dynamitemedia dynamitemedia is offline
New Member
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
any news on this?

im interested in this as well but i am alo interested ina twist...

we all know that the .asx file when clicked starts right there.

could you set it in php to start and be at the point everyone else is viewing? liek watching a tv show... when they click it starts streaming by the time it is when they clicked..

like for exampke in your actual .asx file you have 6 hours of streaming. each file is started at a certain "wallclock" time like at 6am or 12 am.. for example...

so they surfer clicks at 8pm, and the php looks for that time in the .asx file and starts streaming at this point?

i think this would be very useful,much like a .wsx file

maybe somethinmg like using $time and $media

i dont much about php or i would try and write it myself...

any ideas? email me at dynamitemedia@hotmail.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 11-05-05, 06:20 AM
nugensoftware's Avatar
nugensoftware nugensoftware is offline
Newbie Coder
 
Join Date: Oct 2005
Location: United States
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
btw you can redeclare the .asx php execution in .htaccess with the same code no need to edit the apache config as long as your server is setup to allow them to be rewritten.

i use it often to php enable xml files.
__________________
Nugen Software Inc.
Lead Developer
www.nugensoftware.com

PHP HELP | MySQL HELP | xmlSYNC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 02-16-06, 02:56 PM
deboorn deboorn is offline
New Member
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Using PHP file as ASC File

Windows media player will recognize a PHP ( ".php" ) as a asx when loading. So just simply use a php file as the video play-list source.

If for some reason that doesn't work just use the header() function in php to send out a header of type "ASX" instead of "PHP" in the PHP play-list file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Form to update a MySQL database? Scoobler PHP 9 09-04-08 02:41 AM
PHP Error Fairnie PHP 8 06-26-04 08:15 AM
need some help with this code buzzby PHP 0 06-20-04 04:07 AM
mysql query loading problem scorpioy PHP 0 05-23-04 04:16 PM
New Web Host, New Problem! justchat PHP 2 09-29-03 03:39 PM


All times are GMT -5. The time now is 07:06 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.