This sample implements a simple RSS server that advertises the contents of a listable tag as a RSS channel. The RSS channels implement the Yahoo media extensions so the channels are compatible with media-enabled readers such as Miro.
In order to show thumbnails for the channel items, the code will look for an attribute named REF_Thumbnail that contains the ObjectID of the object's thumbnail. Also, if the attribute "Filename" exists in the user metadata, it will be used as the filename for the channel item. If you load content using the Hana browser application (the 'cosbrowser' sample and its associated processing server), your objects will be set up this way.
An additional file, MediaStreamer.php streams objects and their thumbnails over http. This is required to provide access to these objects in a "Linkable URL" (the REST api requires HTTP headers to be set and thus a URL cannot be generated for objects' contents).
To install this sample, you will first need a PHP-enabled web server. The easiest way to do this is to download a pre-packaged solution such as XAMPP that combines Apache and PHP.
Next, create a directory for the program (e.g. C:\xampp\htdocs\rss
). Copy the sample files into the new directory along with the .php files from the PHP wrapper (CosHelpers.php, CosInterface.php, CosObjects.php, CosRestApi.php
). Finally, edit RssSettings.php
and enter the hostname of your COS server, your UID, and your shared secret.
Finally, start your web server and open a browser. Point to your sample application directory and use the CosRss.php page to generate the channel. You must pass the name of a listable tag in the "tag" parameter, e.g. http://localhost/rss/CosRss.php?tag=listable
A good RSS reader to view video channels with is Miro: http://www.getmiro.com/
Theoretically, this sample will provide read access to any object the UID used can access. It is not suitable for production use!