summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorus2022-10-25 20:54:38 +0200
committerHorus2022-10-25 20:54:38 +0200
commite0cf75035215bed06976a50ccf85d620509d0671 (patch)
tree7d7bc6a9b8765edad4aa07b71b915bbd42b72b63
parent268004be9f94c1f87bf41490db48a4bc4240cb28 (diff)
downloaddilbert_rss-e0cf75035215bed06976a50ccf85d620509d0671.tar.gz
new URL + catch exceptionHEADmaster
-rw-r--r--index.php8
1 files 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)