#!/usr/bin/php open("https://hltv.org/news.rss.php"); $feed->read(); echo "```\n"; echo " ___ ___ _ _ _ ___ \n"; echo "| | -_| | | |_ -|\n"; echo "|_|_|___|_____|___|\n"; 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();