This commit is contained in:
Gogs
2026-07-07 15:54:11 +02:00
parent c60bfc874a
commit 6d4189730f
17 changed files with 1293 additions and 16 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
$url = 'https://raw.githubusercontent.com/doglover3920/EPGimport-Sources/main/rytec.sources.xml';
$xmlText = file_get_contents($url);
if ($xmlText === false) {
fwrite(STDERR, "Konnte rytec.sources.xml nicht laden.\n");
exit(1);
}
$xml = simplexml_load_string($xmlText);
if (!$xml) {
fwrite(STDERR, "Konnte rytec.sources.xml nicht lesen.\n");
exit(1);
}
foreach ($xml->xpath('//sourcecat') as $cat) {
$catName = (string)$cat['sourcecatname'];
echo "\n=== {$catName} ===\n";
foreach ($cat->source as $source) {
$description = trim((string)$source->description);
echo "- {$description}\n";
foreach ($source->url as $sourceUrl) {
echo " " . trim((string)$sourceUrl) . "\n";
}
}
}