www.cantonbecker.com   Free & Easy Podcasting PHP Script for Distributing MP3s

up

music
music

Sounds, Samples, Mayhem
projects

weird
weird


       mp3feed.php
 

Scenario: You have a directory of mp3 files that you want to share with the podcasting world. You don't want to monkey around with setting up a blog that supports MIME attachments. You are probably a musician who wants to podcast, not a blogger.

Solution: Configure and then save this single PHP script somewhere on the same webserver where your mp3s live. For each mp3 that you want included in your current podcast, add (or remove) a correspondingly named .txt file that supplies some extra info about the mp3.

Requirements: Your web server must have PHP installed.

How it works: When the PHP script is invoked, it scans your music directory for mp3 files that have a matching txt file, e.g. "loud-bang.mp3" and "loud-bang.txt". For each of these, it generates a separate blog entry with the MP3 as its MIME attachment.

Cost / Support: This script is free. Modify it however you like. If you distribute it, please credit this page. Email canton @ gmail . com to get support on an "if I have free time" basis.


INSTRUCTIONS:

  1. Copy and paste the script below into a text editor. Configure all the required variables (e.g. file path and URL to your mp3s.)
     
  2. Save it on your webserver, somewhere nearby your mp3s. Name it something like 'music-feed.php'. The URL to this php file will be the URL listeners will use to subscribe to your feed. It's common practice to add a little orange XML button like that links to your feed from some standard web page that talks about it. Like this one, which links to my own music feed:


     
  3. For each mp3 that you want to include in your podcast, create a correspondingly named text file that contains a little bit of information about the mp3. (Just a line or two. Basic HTML is okay.) This marks your mp3 as "ready for distribution."

    So, if you have a mp3 called 'loud-song.mp3' then, in the same directory as the mp3, make a text file called 'loud-song.txt'.

    That's all. Enjoy!

    - Canton

mp3feed.php podcasting script version 1.1 (June 28, 2005)


Podcasting tip: If you need unique sounds, loops, f/x, or want to meet other music producers and DJs, check out sampleswap.org. It's free too.