PHP function for displaying a stream in Atom format

How a simple PHP function maps an Atom stream. The script is compatible with Atom 1.0.

Other versions may work, but have not been tested. Because the script extracts title, link, and summary or subTitle tags, ignoring the document structure format, compatibility can be quite broad.

Interface

The interface consists of two functions:

Atom_Display()

To view a complete stream with a feed, headers, related articles, and their descriptions.

Atom_Links()

To view only a list of titles associated with items.

Source code

The source contains other internal functions:

Atom_Retrieve(url)        // extraie la balise feed et appelle Atom_Feed.
Atom_Feed(channel)        // extraie les données du feed et appelle Atom_Tags.
Atom_RetrieveLink(url)    // appelle Atom_Tags pour chaque item de feed.
Atom_Tags(item)           // extraie title, links, summary pour un article.

See atomlib.php script.

Loading

The archive contains a script and a demo.

License: Mozilla 1.1.