Location: PHPKode > scripts > PHP Universal Feed Generator > example_minimum.php
  // This is a minimum example of using the class
  //Creating an instance of FeedWriter class. 
  $TestFeed = new FeedWriter(RSS2);
  //Setting the channel elements
  //Use wrapper functions for common channel elements
  $TestFeed->setTitle('Testing & Checking the RSS writer class');
  $TestFeed->setDescription('This is test of creating a RSS 2.0 feed Universal Feed Writer');
  //Image title and link must match with the 'title' and 'link' channel elements for valid RSS 2.0
  $TestFeed->setImage('Testing the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/images/logo.gif');
	//Detriving informations from database addin feeds
	$result = $db->result;

	while($row = mysql_fetch_array($result, MYSQL_ASSOC))
		//Create an empty FeedItem
		$newItem = $TestFeed->createNewItem();
		//Add elements to the feed item    
		//Now add the feed item
  //OK. Everything is done. Now genarate the feed.
Return current item: PHP Universal Feed Generator