Skip to content
A JSON list of podcast hosts and a pattern to use in audio URLs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md

README.md

podcast-hosts

A JSON list of podcast hosts and a pattern to use in audio URLs

If you have the URL of a podcast's audio file, this JSON file will help you work out who the host is.

Contributing to the list

For now, the simplest way is to add to the file at src/hosts.json. Each podcast host may have multiple entries, but the URL patterns should be unique.

Each entry must contain the following properties:

  • pattern: a unique string to spot within the audio URL (more accurately, within the domain portion of the URL)

  • hostname: a humanly-readable name of the podcast that this is hosted with

  • hosturl: a website link (escaped) that links to the homepage of the podcast host.

Parsing order

There's no order currently to this

Code sample

Podnews uses the below to extract a host's name in the "Information for podcasters" section in our podcast pages (example), and our podcast analysis pages.

$stmt = $db->prepare("SELECT * FROM `podcasts-hosts` WHERE INSTR(:url,pattern) LIMIT 1"); $stmt->execute(array(':url'=>$podcast['audiourl'])); $host = $stmt->fetch(PDO::FETCH_ASSOC);

Improvements welcome to this list; it's currently "good enough", but certainly not 100% accurate. It also falls over if audio is "hosted" on Feedburner.

You can’t perform that action at this time.