Go Back   CodingForums.com > Web Projects and Services Marketplace > Web Projects > Paid work offers and requests (Now CLOSED)

Notices

Before you post, read our: Rules & Posting Guidelines

 
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-13-2006, 05:14 PM   PM User | #1
gamesport
New Coder

 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
gamesport is an unknown quantity at this point
dynamic asx file with php code (PAID)

On the microsofts site, they show an example of a dynamic asx file done using asp code.

I was hoping someone would have come up with a php version of it, i searched high and low, and i came up with just a snippet from another coding forum:

Quote:
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";
}
}
i hope someone can help me with the full code for $20 or want to negotiate the price, please drop me an email at gamesport at hotmail (also my msn messenger address)

Here is the asp version btw
Code:
<%@ Language="JScript" %>
<%    
    // Note that setting the Request.ContentType property to     
    // "video/x-ms-asf" lets you create dynamic    
    // metafiles that do not contain HTTP header data.    
    Response.ContentType = "video/x-ms-asf";
%>
<%  // Set the BASE_PATH variable to point to your    
    // server running Windows Media Services.    
    var BASE_PATH = "mms://MyMediaServer/";    
    //Force content to always refresh.    
    Response.Expires = 0;    
    //Create the opening ASX tag.    
    Response.Write (AsxHeader());      
    //Create an ad.     
    Response.Write (AdEntry());     
    //Create an XML entry for content.    
    Response.Write (AsxEntry());    
    //Write the ASX footer.    
    Response.Write (AsxFooter());
// This function returns an opening <ASX> tag.
function AsxHeader ()
{    
    return "<ASX Version=\"3\">" + "\n" + "<TITLE> Demo Dynamic ASX File              
        From Active Server Pages </TITLE>" + "\n";
}
// This function returns an ad based on user request.
function AdEntry()
{    
    if (Request("AdPref") == 0)    
    {        
        return "    <ENTRY>" + "\n" + "\t" + "<REF HREF=\"" + BASE_PATH +                      
                    "AdInsertion/BackpackingAd.wmv\" />" + "\n" +                      
                    "    </ENTRY>" + "\n";    
    }    
    else    
    {        
        return "    <ENTRY>" + "\n" + "\t" + "<REF HREF=\"" + BASE_PATH +                      
                    "AdInsertion/TravelAd.wmv\" />" + "\n" +                      
                    "    </ENTRY>" + "\n";    
    }
}
// This function returns an XML entry for a specific piece of content.
// With actual code, this function does a database lookup.
function AsxEntry ()
{    
    var AsxEntry, Abstract;    
    AsxEntry = "    <ENTRY>" + "\n" + "\t" +                
               "<TITLE> Upcoming Movie Releases in 2004 </TITLE>" + "\n";    
    AsxEntry += "\t" + "<REF HREF=\"" + BASE_PATH +                 
                "Content/UpcomingReleases2004.asf \"/>" + "\n";    
    AsxEntry += "\t" + "<ABSTRACT>" + "\n";    
    Abstract = " Check out the latest movies to hit the big screen in 2004!";    
    AsxEntry += Abstract + "\n";    AsxEntry += "\t" +"</ABSTRACT>" + "\n";    
    AsxEntry += "\t" + "<COPYRIGHT> Copyright 2004,              
             Southridge Video -- All Rights Reserved </COPYRIGHT>" + "\n";    
    AsxEntry += "    </ENTRY>" + "\n";    
    return AsxEntry;
}
// This function returns a closing </ASX> tag.
function AsxFooter ()
{    
    return "</ASX>";
}
%>

Last edited by WA; 08-05-2006 at 06:56 PM..
gamesport is offline  
 

Bookmarks

Jump To Top of Thread


Thread Tools
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

Forum Jump


All times are GMT +1. The time now is 09:48 PM.


Advertisement
Log in to turn off these ads.