How can PHP be used to extract and manipulate data from an RSS feed of a Wordpress blog for display on another website?

To extract and manipulate data from an RSS feed of a Wordpress blog for display on another website using PHP, you can use the SimpleXMLElement class to parse the XML data from the feed. You can then loop through the items in the feed to extract the necessary information such as post titles, URLs, and publication dates. Finally, you can format this data and display it on your website using HTML.

<?php
$rss = simplexml_load_file('http://example.com/feed/');
if ($rss) {
    foreach ($rss->channel->item as $item) {
        $title = $item->title;
        $link = $item->link;
        $pubDate = $item->pubDate;
        
        echo '<h2><a href="' . $link . '">' . $title . '</a></h2>';
        echo '<p>Published on ' . date('F j, Y', strtotime($pubDate)) . '</p>';
    }
} else {
    echo 'Error loading RSS feed';
}
?>