home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / WeekLink.asp < prev    next >
Text File  |  1997-11-01  |  2KB  |  40 lines

  1. <%@ Language="VBScript" %>
  2. <% Option Explicit %>
  3. <%'
  4.     ' In order to support browsers that do not allow an embedded
  5.     ' NetShow player, we want to trigger a NetShow player to launch
  6.     ' as a standalone and feed it the reference information it needs
  7.     ' to find the right ASF file to play
  8.     '
  9.     ' This asp file is never displayed. By setting the content type
  10.     ' of the Response object to "video/x-ms-asf" the page instead
  11.     ' will launch the application associated with this mime type, 
  12.     ' namely the NetShow player, and pass it the absolute http reference
  13.     ' it requires.
  14.     '
  15.   Dim strASFPath ' this variable will store the absolute http reference to the asf file
  16.   strASFPath = "http://" & Request.ServerVariables("SERVER_NAME")
  17.     strASFPath = strASFPath & Request.ServerVariables("PATH_INFO")
  18.  
  19.     ' at this point, strASFPath contains an absolute reference to 
  20.     ' this page. For example, if the server name is MyServer and 
  21.     ' the application is stored in a virtual called Exair, then the value
  22.     ' of strASFPath is now "http://MyServer/ExAir/Freqflyer/WeekLink.asp"
  23.     ' The next line gets rid of the "WeekLink.asp" part
  24.  
  25.     strASFPath = left(strASFPath, len(strASFPath) - len("WeekLink.asp"))
  26.     
  27.     ' Now, we need to tack on the rest of the path to the asf file:
  28.     
  29.     strASFPath = strASFPath & "multimedia/k2demo288.asf"
  30.  
  31.   ' Finally, set the content type. 
  32.     
  33.     Response.ContentType = "video/x-ms-asf"
  34.     
  35.     ' The text that follows this ASP script will be sent to the
  36.     ' NetShow player so that it can find the correct file to play. 
  37. %>
  38. [REFERENCE]
  39. REF1=<%= strASFPath %>
  40.