From b815acee05cd3dfb5c930f61222a43d36fb10e60 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sun, 20 May 2018 17:09:36 +0200 Subject: [PATCH] Make RSS more valid. --- rss.php | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/rss.php b/rss.php index fcf92c3..523cac6 100644 --- a/rss.php +++ b/rss.php @@ -1,9 +1,3 @@ - - - - TCL OTA - https://tclota.birth-online.de/timeline.php - TCL OTA updates 0) { } } +header('Content-Type: application/rss+xml'); + +?> + + + + TCL OTA + https://tclota.birth-online.de/timeline.php + + TCL OTA updates +setTimezone(new DateTimeZone('CET')); $dateLast = new DateTime($file['published_last']); $dateLast->setTimezone(new DateTimeZone('CET')); - echo ''; - echo '' . $file['tv'] . ''; - echo 'https://tclota.birth-online.de/timeline.php'; - echo ''; + echo '' . PHP_EOL; + echo ' ' . $file['tv'] . '' . PHP_EOL; + echo ' https://tclota.birth-online.de/timeline.php' . PHP_EOL; + echo ' format('Y-m-d') . ' ' . $date->format('H:i.s') . ' CET
'; echo 'Devices: ' . implode(', ', $validDevs) . '
'; echo 'Last released: ' . $dateLast->format('Y-m-d H:i.s') . ' (first seen in the wild: ' . $firstSeen->format('Y-m-d H:i.s') . ')
'; - echo 'Valid for (order of release): ' . implode(', ', $validRefs) . '
'; - + echo 'Valid for (order of release): ' . implode(', ', $validRefs); + echo ']]>
' . PHP_EOL; + echo '
' . PHP_EOL; } ?>