WebSite-PHP Framework PHP
Multi language
Simple Ajax mode
No HTML, no JavaScript
URL rewriting
Mail sending
Sitemap - RSS - Web service
Download WebSite-PHP FrameWork now


Tutorial Rss-generator



Tutorial Rss-generator

To use Rss-generator, you need to connect to the admin interface of the framework WebSite-PHP.

Once connected you will go to the menu Configuration -> Configure modules and enable the module Rss-generator.

Tutorial 1 : Simple RSS
<rss version="2.0">
<title>WebSite-PHP Framework PHP</title>
<description>WebSite-PHP est un FrameWork PHP 100% objet. Plus besoin de connaître le HTML, il suffit d'instancier les bons objets.</description>
<pubDate>Wed, 01 Aug 2007 00:00:00 +0200</pubDate>
<title>WebSite-PHP Framework PHP</title>
<lastBuildDate>Fri, 12 Apr 2024 00:00:00 +0200</lastBuildDate>
<webMaster> (WebSite-PHP Framework)</webMaster>
<description>Test description</description>
<pubDate>Fri, 12 Apr 2024 20:36:06 +0200</pubDate>
<author> (WebSite-PHP Framework)</author>
<guid isPermaLink="true"></guid>
File: /pages/tutorials/rss-generator/rss-generator-01.php

// Use: http://YOUR_DOMAIN/tutorials/rss/rss-01.xml

class RssGenerator01 extends Page {
    public function 
InitializeComponent() {
parent::$PAGE_TITLE "Simple RSS";
// Create the new instance of the RSS Feed
$rssFeed = new RSSFeed('utf-8');
// Activate the string protection
// Set the feed title
// Set the feed description
// Set the feed link
// Set the feed publication date
// Set the feed last build date
// Set the feed webmaster
$rssFeed->setWebMaster(__(SMTP_MAIL), __(SMTP_NAME));
// Set the feed managing editor
$rssFeed->setManagingEditor(__(SMTP_MAIL), __(SMTP_NAME));
// Set the feed image
__(SITE_NAME), $this->getBaseURL(), 
__(SITE_DESC), 128400);
// Creating a new feed item
$rssItem = new RSSFeedItem();
$rssItem->setDescription('Test description');
$rssItem->setAuthor(__(SMTP_MAIL), __(SMTP_NAME));
$rssItem->setPubDate(date('Y-m-d H:i:s'));
// Add the item to the feed
$this->render $rssFeed;



Copyright © 2009-2024 WebSite-PHP Framework PHP
Home Documentation Download Quick start Tutorials Wiki Issue Tracker