Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php // The URL of the RSS feed $url = 'https://www.aripaev.ee/rss'; // Use file_get_contents() to fetch the feed $rss = file_get_contents($url); // Use simplexml_load_string() to parse the XML content $xml = simplexml_load_string($rss); // Check if the parsing was successful if ($xml === false) { echo "Error parsing the XML\n"; foreach(libxml_get_errors() as $error) { echo "\t", $error->message; } } else { // Loop through each <item> tag within the <channel> tag foreach ($xml->channel->item as $item) { print_r($item); } } ?>
Copy Clear