Script for reading all streams in PHP

This PHP script contains one function that can show any syndication stream in all formats. The file URL can be local, rss.xml, or remote https://www.iqlevsha.ru/rss.xml.

The script is compatible with:

Interface

The interface includes one function:

Common_Display (url, size, channel-option, desc-option, date-option )

The interface requires a required argument, url, and recognizes four additional arguments:

  1. url :
    The address of the XML file on the network.
  2. size:
    Maximum number of items to display. 25 by default.
  3. option channel:
    true if the channel is displayed, false otherwise. The default value is true.
  4. desc-option :
    true if descriptions are otherwise displayed, or false. the default is true.
  5. date variant:
    true if dates are displayed or false otherwise. false by default.

How to show only a link on the site

To show only part references, replace in the function Common_Display this line:

last $ = array_slice ($ Common _ Content, 0, $ size);

by:

last $ = array_slice ($ Common _ Content, 1, $ size);

Download scripts and demos

Documentation

License: Mozilla 1.1.