935 shaares
171 private links
171 private links
How to display an RSS feed with a single PHP function? The URL of the file may be
- local, in the form: rss.xml, or
- distant in the form: http://www.scriptol.com/rss.xml.
There is only one difference, if the filename has the ".php" extension when it is generated by a CMS or such software, locally the file is processed by the server as a text file while remotely it is processed as a script. There is no difference if the extension is ".xml".
The script is compatible with:
- RSS 2.0 (that is compatible with 0.91, 0.92 etc.)
- RSS RDF or RSS 1.0.
Actually the script extracts the title, link and description tags and ignores the format of structure of the document.
The benefit of PHP to display an RSS feed is that it will be visible by search engines.