Streaming MP3's
This Code when put in any directory will create a HTML page listing all Mp3's in the directory. It also creates a streaming link to the file, so anyone can stream off you MP3's from your server withour downloading them.
AI
Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Zdrojový kód
I streamlined my last example:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<%
On Error Resume Next
Dim FileSystemObject, Folder, FileCollection, File
Dim FolderPath, WebDir
If Request.QueryString("play") >"" Then
Response.Write "<EMBED src=" & chr(34) & Request.QueryString("play") & chr(34)
Response.Write " width=350 height=43 controls=console volume=80"
Response.Write " width=350 loop=false type='audio/mp3'>"
Response.Write "<BR>"
End If
Server.ScriptTimeOut=1
FolderPath= server.MapPath(".") & "\"
WebDir= Request.ServerVariables("PATH_INFO")
Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
'List All Files
Set Folder = FileSystemObject.GetFolder(Folderpath)
Set FileCollection = Folder.Files
For Each File In FileCollection
s = LCase(File.Name)
If ucase(Right(File.name,4))=".MP3" Then
Response.Write "<A href=" & chr(34) & webdir & "?Play=" & File.name & chr(34) & ">" & File.name & " FileSize=" & File.size & "</A><BR>"
Else
'Code To display other file types with a regular link
'Response.Write "<A href=" & chr(34) & webdir & f1.name & chr(34) & ">" & f1.name & " FileSize=" & f1.size & "</A><BR>"
End If
Next
%>
</BODY>
</HTML>
Původní komentáře (3)
Obnoveno z Wayback Machine