#!/usr/bin/php open("https://hltv.org/news.rss.php"); $feed->read(); echo "```\n"; echo file_get_contents($LOGO_FILE); echo "```\n"; while ($feed->read()) { if ( $feed->name === "item") { $children = $feed->expand(); foreach ($children->childNodes as $child) { if ( $child->nodeType === XML_TEXT_NODE ) { continue; } if ( $child->tagName === "title" ) { echo "\n## " . $child->nodeValue . "\n"; } if ($child->tagName === "description") { $story_description = $child->nodeValue; } if ($child->tagName === "link") { $link = $READER_LINK . "?" . urlencode($child->nodeValue); echo "=> " . $link . " " . $story_description . "\n"; } } } } $feed->close();