Skip to content

Instantly share code, notes, and snippets.

@DominicImhof
Last active July 4, 2017 10:51
Show Gist options
  • Save DominicImhof/99ea5bf4716763fefdd62d8f49c9f25e to your computer and use it in GitHub Desktop.
Save DominicImhof/99ea5bf4716763fefdd62d8f49c9f25e to your computer and use it in GitHub Desktop.
Save DirCaster Output to feed.xml
DirectoryIndex feed.xml
AddType audio/x-m4a m4a M4A
AddType video/mp4 mp4 MP4
AddType video/x-m4v m4v M4V
AddType audio/mpeg mp3 MP3
AddType audio/playlist m3u M3U
AddType audio/x-scpls pls PLS
AddType application/x-ogg ogg OGG
AddType audio/wav wav WAV

Installation

  1. Datei dircaster_save.php im DirCaster-Ordner ablegen
  2. Damit beim Aufruf von DirCaster (z.B. www.podcast.io/feed) die feed.xml angezeigt wird, DirectoryIndex in .htaccess anpassen (siehe Beispiel)

Damit nun die feed.xml Datei geupdatet wird, das dircaster_save.php File jeweils manuell aufrufen (z.B. www.podcast.io/feed/dircaster_save.php) oder einen Cronjob auf dem Server einrichten

<?php
ob_start();
require_once __DIR__ . '/dircaster.php';
$dircaster_output = ob_get_contents();
ob_end_clean();
file_put_contents(__DIR__ . '/feed.xml', $dircaster_output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment