From e0cf75035215bed06976a50ccf85d620509d0671 Mon Sep 17 00:00:00 2001 From: Horus Date: Tue, 25 Oct 2022 20:54:38 +0200 Subject: new URL + catch exception --- index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 08f55f7..22b7651 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,11 @@ use Suin\RSSWriter\Feed; use Suin\RSSWriter\Item; function get_dilbert_items(){ - $xml = simplexml_load_file("http://dilbert.com/feed"); + try { + $xml = simplexml_load_file("http://dilbert.com/feed"); + } catch(Exception $e) { + die($e); + } if (false === $xml) { die('Error: Loading http://dilbert.com/feed failed. ' . strtotime(date("r")) ); } @@ -51,7 +55,7 @@ function generate() { $channel ->title("Dilbert") ->description("Dilbert - with Pictures") - ->url( "https://feeds.iamfabulous.de/Dilbert.xml" ) + ->url( "https://www.maximilianmoehring.com/tools" ) ->pubDate(strtotime(date("r", time()))) ->lastBuildDate(strtotime(date("r", time()))) ->ttl(5) -- cgit v1.2.3