PHP code example of robertlemke / rss
1. Go to this page and download the library: Download robertlemke/rss library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
robertlemke / rss example snippets
$feed = new \RobertLemke\Rss\Feed();
$channel = new \RobertLemke\Rss\Channel();
$channel
->setTitle('All about Neos Flow')
->setDescription($channelDescription)
->setFeedUri($feedUri)
->setWebsiteUri($websiteUri)
->setLanguage('en-US');
$item = new \RobertLemke\Rss\Item();
$item
->setTitle('My first blog post')
->setGuid($someUniqueIdentifier)
->setPublicationDate(new DateTime())
->setContent($blogPostContent);
$channel->addItem($item);
$feed->addChannel($channel);
echo $feed->render();