Search Tools Links Login

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.

Original Author: Ron Light


None. Just drop it in the directory with your mp3's. This is not a recursive list meaning it only lists those in the current directory.


Html page with streaming links to all mp3's in current dirrectory.

API Declarations

If you look at this you owe me royalties! Just kidding.


I streamlined my last example:

  On Error Resume Next
  Dim FileSystemObject, Folder, FileCollection, File
  Dim FolderPath, WebDir
If Request.QueryString("play") >"" Then
  Response.Write "   Response.Write " width=350 height=43 controls=console volume=80"
  Response.Write " width=350 loop=false type='audio/mp3'>"
  Response.Write "
End If
  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(,4))=".MP3" Then
Response.Write "" & & " FileSize=" & File.size & "
'Code To display other file types with a regular link
'Response.Write "" & & " FileSize=" & f1.size & "
End If

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 115 times




No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.