RSSlib

Docs provided by 2rss.com

This library allows you to add RSS content to your site, for free.Your site will look more professional with fresh content updated daily. See our online demo.

How it works?
You can find many RSS feeds on the Internet or browsing our directory. All you need is RSS file URL. Right click on RSS or XML icons to copy the links. Then you can install RSSlib scripts and customize them to add content directly to your web pages. These scripts are made with PHP & ASP*see note. You can use a separate <frame>, <iframe> or <div> to display RSS to your page. Or you can display them using JavaScript anywhere in your page.

Features
RSSlib functions allows you to control many parameters. Resulting HTML content is fully customizable using CSS. You can change font, colors and many more. Also, you can choose to use cached RSS feeds or every call will request a fresh RSS content. Then, you can set maximum items and maximum length for descriptions (longer descriptions could be truncated). Finally, you can set-up target for displaying documents (current or new browser window, a frame or anything else).

Installation

Technical details
RSSlib consists in a few files with .php or .asp extension. They are:

To use these script files you should install them on your web site, locally. Then you can create links to these pages.

Also, RSSlib allows you to use cached RSS feeds for speed or traffic reasons. Instead of loading every time RSS content from original locations you can use a local copy. Read more here.

Function parameters
Rss2html() & rss2js() functions could have a few parameters passed thru query string (URL) to rss2html.php ( /.asp) and rss2js.php ( /.asp) pages. These are:

For instance, after you install these files locally you can use something like these:

... <a href="rss2html.php?rss_url=...(RSS_feed_URL)...&rss_target=_blank">RSS feed name</a> ...
... <iframe width="200" height="300" src="rss2html.php?rss_url=...(RSS_feed_URL)...&rss_items=3"></iframe> ...
... <script language="JavaScript" src="rss2js.php?rss_url=...(RSS_feed_URL)...&rss_chars=100&rss_target=_top"></script> ...

CSS
All items from RSS feed are controlled by rsslib.css file. By default, all styles have rsslib prefix. You can change this prefix in rsslib.css file and all calls to rss2html() or rss2js() functions using rss_css parameter (as described above). Every information displayed by RSSlib uses a custom style. You can change them in rsslib.css file. Also you can include this file in other CSS files using @import. All styles are:

You can change directly any aspect of these styles.

Cache
RSSlib can use cached (for speed or traffic issues) or non-cached RSS feeds (default is cached). Doing this, a local copy of RSS feed is used instead of using RSS feed from its original location every time when functions are called. You can specify how long a cache is valid and where to keep this cache. Don't forget to create a folder where cached files are kept (default is "tmp" in current folder).
To enable/disable it you have to edit rsslib.php ( /.asp) file. At the beginning there are 3 parameters which controls caching:

When a cache is used, for every RSS feed is created a local copy of RSS content in folder you specified, valid for how long you specified. When time expires a new copy of data is created. For every RSS feed is created a separate file.

If use_cache variable is false no cache is used and every call is made against original web site.

Important
All these scripts are distributed for free without any guarantees ("AS IS"). You can use or customize them upon your needs, but you have to maintain all copyright information. 2RSS.com or its author is not responsible for malfunction or other copyright issues that comes from using RSlib. It is your responsibility to use them properly. You are not allowed to sell these scripts. For any problems, please contact us on our web site. All rights reserved to 2RSS.com and their author.

You are not allowed to remove "Powered by RSSlib" text. If you want RSSlib scripts without copyright information please visit www.2RSS.com/buyrsslib.php.

*Note for ASP pages:
1. You have to install MS XML parser available for free at msdn.microsoft.com/downloads/.
2. Part of these scripts are taken from pajhome.org.uk/crypt/md5/ (distributed under BSD license):
   A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
   Digest Algorithm, as defined in RFC 1321.
   Copyright (C) Paul Johnston 1999 - 2000.
   Updated by Greg Holt 2000 - 2001.
   Adapted for use in ASP by Ian Brennan, Cyrona Software, 2001
   (Any modifications covered by LGPL)

Updates:

Ovi Crisan
2RSS.com