Time to do an update.
This commit is contained in:
parent
70c8a87e15
commit
0b0697bb42
22 changed files with 4352 additions and 268 deletions
36
classes/RSS.php
Normal file
36
classes/RSS.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace DJMixHosting;
|
||||
|
||||
class RSS
|
||||
{
|
||||
|
||||
private $db;
|
||||
private string $header = '<?xml version="1.0" encoding="UTF-8" ?>';
|
||||
private string $rss = '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
|
||||
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">';
|
||||
|
||||
|
||||
private function itemMix($mix)
|
||||
{
|
||||
$output = new Mix($mix, $this->db);
|
||||
|
||||
if ($output->get_recorded() != "") {
|
||||
$pubdate = date('D, d M Y H:i:s O', strtotime($output->get_recorded()));
|
||||
} elseif ($output->get_created() != "") {
|
||||
$pubdate = date('D, d M Y H:i:s O', strtotime($output->get_created()));
|
||||
} else {
|
||||
$pubdate = date('D, d M Y H:i:s O', strtotime('2008-01-01 12:00:00'));
|
||||
}
|
||||
|
||||
echo '<item>';
|
||||
echo '<title>' . $output->get_name() . '</title>';
|
||||
echo '<description>' . $output->get_description() . '</description>';
|
||||
echo '<link>' . $output->get_url() . '</link>';
|
||||
echo '<guid>' . $output->get_slug() . '</guid>';
|
||||
echo '<pubDate>' . $pubdate . '</pubDate>';
|
||||
echo '</item>';
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue