From auWiki
Jump to: navigation, search

The auFeed class is part of the auLib package (as of v0.1.0). It provides functions for building RSS feeds.


Scripts can use this class to more easily generate RSS feeds.

  1. Create an auFeed object with the appropriate values for the feed.
  2. Add items to the feed with AddItem().
  3. Call End() to finish the feed.



If not defined already when auFeed is included, this will be set to UTF-8. Affects new auFeed and AddItem.

Public Functions

new auFeed

new auFeed($title, $url, $description, $copyright, $lang)

Creates a new feed with the specified properties.

  • $title = Title of the feed.
  • $url = URL where the contents of the feed can be found. Default is the website front page.
  • $description = A description of the feed. Default is none.
  • $copyright = The copyright of the contents of the feed. Default is none.
  • $lang = The language of the feed. Default is 'en-us'.


AddItem($description, $title, $url, $date, $id, $idLink)

Adds an item to the feed. All parameters are optional, but either $description or $title must be provided.

  • $description = Item description. Default is none.
  • $title = Item title. Default is none.
  • $url = URL where the content can be found on the main website. Default is none.
  • $date = Unix timestamp for the item. Default is none.
  • $id = Unique identifier for the item. Default is none.
  • $idLink = Whether the ID is a link. Default is not a link.



Ends the feed.