FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 rss2html.php script documentation v3.0 View next topic
View previous topic
Post new topicReply to topic
Author Message
Tech Support



Joined: 27 Aug 2004
Posts: 2782

PostPosted: Wed Mar 09, 2005 10:55 am Reply with quoteBack to top

RSS2HTML PHP Script Documentation v3.x

Contents
Introduction
Uses
Quick Start
Templates
Running from FeedForAll's server
Running on local server
Example websites
Advanced Notes
Restricting Access
Caching

Introduction:
-------------

FeedForAll has made available a free PHP program called rss2html.php, which can be used by webmasters to automatically display RSS feeds on their website. The resulting webpage will always show the RSS feed's most current data. The advantage of using the rss2html.php script is that the resulting webpage's contents will always be up to date, and can be easily spidered by search engines.


Uses:
-----

- Create a webpage with an RSS feed's information
- Insert an RSS feed's information into a location in an existing webpage


Quick Start:
------------

rss2html.php has a built in utility to help get started quickly. This is done by calling rss2html.php with the parameter "buildURL", for example http://scripts.rss2html.com/public/rss2html.php?buildURL . After filling in the infomation about your feed and template you will be shown the exact code to include the output of rss2html.php into a webpage.


Templates:
----------

FeedForAll's rss2html.php script uses templates to generate its output. The templates allow you to easily control what the resulting webpage will look like. A template can be used to generate a complete webpage, or a portion of a webpage like a table (which can then be included inside an existing webpage). The template's syntax is exactly the same as the syntax used in FeedForAll's export functions.

Templates are simply standard HTML documents, with special variables inserted where the RSS feed's data should appear. Usually the easiest way to create a template is to create a sample webpage with some real data in it, and then replace the feed's data with template variables, or modify an existing webpage, by adding template variables. Here is a list of the variables supported by FeedForAll's rss2html.php script:

~~~FeedTitle~~~ (The feed's title)
~~~FeedDescription~~~ (the feed's description)
~~~FeedContentEncoded~~~ (the feed's description from optional ContentEncoded field)
~~~FeedLink~~~ (the feed's link)
~~~FeedPubDate~~~ (the feed's pub date/time in RSS format)
~~~FeedPubLongDate~~~ (the feed's date in a long date format)
~~~FeedPubShortDate~~~ (the feed's date in a short date format)
~~~FeedPubLongTime~~~ (the feed's time in a long time format)
~~~FeedPubShortTime~~~ (the feed's time in a short time format)
~~~FeedCreativeCommons~~~ (the feed's Creative Commons(R) License URL if one exists)
~~~FeedImageUrl~~~ (the URL to the feed's image)
~~~FeedImageTitle~~~ (the title for the feed's image)
~~~FeedImageLink~~~ (the link associated with the feed's image)

~~~FeedMaxItems=X~~~ (the maximum number of items to appear on the webpage - replace 'X' with a number. The first 'X' number of items in the feed will be displayed. Using a negative number for 'X' will show the last 'X' items from a feed.
~~~SortByPubDate~~~ (the items will be sorted by their PubDate, before they are displayed - newest first)
~~~NoFutureItems~~~ (items with PubDates that are in the future won't be displayed until that date/time arrives)

~~~BeginItemsRecord~~~ (repeat everything between this and the end marker, for each item)
~~~EndItemsRecord~~~ (repeat everything between this and the start marker, for each item)
~~~BeginAlternateItemsRecord~~~ (separates the ItemsRecord into alternating halves)

~~~ItemTitle~~~ (the item's title)
~~~ItemDescription~~~ (the item's description)
~~~ItemContentEncoded~~~ (the item's description from optional ContentEncoded field)
~~~ItemLink~~~ (the item's link)
~~~ItemPubDate~~~ (the item's pub date/time in RSS format)
~~~ItemPubLongDate~~~ (the items's date in a long date format)
~~~ItemPubShortDate~~~ (the item's date in a short date format)
~~~ItemPubLongTime~~~ (the item's time in a long time format)
~~~ItemPubShortTime~~~ (the item's time in a short time format)
~~~ItemEnclosureUrl~~~ (the item's enclosure URL)
~~~ItemEnclosureType~~~ (the item's enclosure MIME type)
~~~ItemEnclosureLength~~~ (the item's enclosure Length)
~~~ItemEnclosureLengthFormatted~~~ (the item's enclosure Length formatted into Kilo, Mega or Giga Bytes)
~~~ItemGuid~~~ (the item's GUID field value)
~~~ItemAuthor~~~ (the item's author field value)
~~~ItemComments~~~ (the item's comments field value)
~~~ItemSource~~~ (the item's source field value)
~~~ItemSourceUrl~~~ (the item's source url attribute value)
~~~ItemCategory~~~ (the first item's category field value)
~~~ItemCategoryDomain~~~ (the item's first category domain attribute value)
~~~ItemCreativeCommons~~~ (The Creative Commons(R) License URL of the item, or feed if there isn't one on the item but there is on the feed)

When the rss2html.php script runs, it will substitute information from the RSS feed into the location wherever a variable is found. For example, every time ~~~FeedTitle~~~ is found in the template's text, the Title from the RSS feed will be substituted.

Special variables:
The ~~~FeedMaxItems=X~~~ variable can be used to limit the number of items that will be inserted into the webpage. Replace the 'X' with a number of feed items you would like displayed (no spaces).

The ~~~BeginItemsRecord~~~ is used to mark the beginning of the section in the template, that should be repeated for each item in the RSS feed. A corresponding ~~~EndItemsRecord~~~ should be used to mark the end of the repeating section. Everything invbetween these two variables will be repeated for every item in the feed. You would typically place all your ~~~Item...~~~ variables in between the ~~~BeginItemsRecord~~~ and ~~~EndItemsRecord~~~ variables.

The ~~~BeginAlternateItemsRecord~~~ tag is optional, and can be used in between the ~~~BeginItemsRecord~~~ and ~~~EndItemsRecord~~~ variables to split the section into two halves. Everything between the ~~~BeginItemsRecord~~~ and the ~~~BeginAlternateItemsRecord~~~ will be used for odd numbered RSS feed items, and everything between the ~~~BeginAlternateItemsRecord~~~ and the ~~~EndItemsRecord~~~ will be used for even numbered RSS feed items. This is typically used to give alternating feed items a slightly different look.

Example - template used to generate a complete HTML webpage:

<HTML>
<HEAD>
<TITLE>~~~FeedTitle~~~</TITLE>
</HEAD>
<BODY>
<H1>~~~FeedTitle~~~</H1>
<BR>
<H2>~~~FeedDescription~~~</H2>
<BR>
<TABLE width="100%">
~~~BeginItemsRecord~~~
<TR>
<TD>
<B>~~~ItemTitle~~~</B>
</TD>
</TR>
<TR>
<TD>
~~~ItemDescription~~~
</TD>
</TR>
<TR>
<TD>
<BR>
</TD>
</TR>
~~~EndItemsRecord~~~
</TABLE>
</BODY>
</HTML>


Example - template used to generate an HTML table, for including inside existing webpage*

<TABLE WIDTH="100%">
~~~BeginItemsRecord~~~
<TR VALIGN="TOP">
<TD>
<BR>
<FONT SIZE="-1">~~~ItemPubShortDate~~~ </FONT><BR>
<B>~~~ItemTitle~~~</B><BR>
~~~ItemDescription~~~<BR>
<BR>
<A HREF="~~~ItemLink~~~">more info</A>
<BR><BR>
</TD>
</TR>
~~~EndItemsRecord~~~
</TABLE>

*Server-side includes, imbedded PHP code, and other inclusion methods are outside the scope of this document.


Running rss2html.php from FeedForAll's public server:
-----------------------------------------------------

If your webserver doesn't support PHP, then you can run the rss2html.php script on FeedForAll's public server instead. All you need to do is setup a link on your website to access the script and resulting webpage.

rss2html.php has a builtin utility to help create the URLs and trouble shoot problems. It is available by adding ?buildURL,

http://scripts.rss2html.com/public/rss2html.php?buildURL

Syntax:

http://scripts.rss2html.com/public/rss2html.php?XMLFILE=<your-rss-feed>&TEMPLATE=<your-template>&MAXITEMS=<max-items>

The above URL should all be on one line, with no spaces.

Replace '<your-rss-feed>' with the full URL to your RSS feed (i.e. http://www.mydomain.com/myfeed.xml)

Replace '<your-template>' with the full URL to the webpage template you want to use (i.e. http://www.mydomain.com/mytemplate.htm)

Replace '<max-items>' with the maximum number of items from your RSS feed you want included on the webpage. The MAXITEMS variable is optional. If it is not included, all the RSS feed items will be included.

Sample:

http://scripts.rss2html.com/public/rss2html.php?XMLFILE=http://www.feedforall.com/blog-feed.xml&TEMPLATE=http://www.feedforall.com/sample-template.html

The above URL should all be on one line, with no spaces.


Running rss2html.php from your own webserver:
---------------------------------------------

Probably the best way to use rss2html.php is to upload it to your own webserver. This gives you two ways to access the script. First, you can setup a link on your webpage to access the script and resulting webpage.

Syntax:
http://<your-domain>/rss2html.php?XMLFILE=<your-rss-feed>&TEMPLATE=<your-template>&MAXITEMS=<max-items>

The above URL should all be on one line, with no spaces.

Replace '<your-domain>' with the domain of your website

Replace '<your-rss-feed>' with the full URL to your RSS feed (i.e. http://www.mydomain.com/myfeed.xml)

Replace '<your-template>' with the full URL to the webpage template you want to use (i.e. http://www.mydomain.com/mytemplate.htm)

Replace '<max-items>' with the maximum number of items from your RSS feed you want included on the webpage. The MAXITEMS variable is optional. If it is not included, all the RSS feed items will be included.

Sample:

http://feedforall.com/rss2html.php?XMLFILE=blog-feed.xml&TEMPLATE=sample-template.html&MAXITEMS=10


The second option is to edit the settings inside of the rss2html.php script itself, and then just access the script as if it were a regular webpage.

With a text editor open up the rss2html.php file. Look for the line near the beginning that looks like this:

$XMLfilename = "sample.xml";

Replace sample.xml with either the local path or full URL to your RSS feed file.

Next, find the line that looks like this:

$TEMPLATEfilename = "BasicWebpage.htm";

Replace BasicWebpage.htm with either the local path or full URL to your template file.

Finally, if you want to specify the maximum number of items to include from your feed, find the line that looks like this:

$FeedMaxItems = 10000;

Replace 10000 with the maximum number of items you want.

Save the file with a new name (what you want to call it on your website), but make sure to keep the .php extension.

For example, if you named it 'myfeed.php', you can now access it from your browser by typing: http://<your-domain.com>/myfeed.php

Sample:

http://www.feedforall.com/blog.php


Examples of the RSS to HTML PHP script in action:

http://www.feedforall.com/blog.htm (FeedForAll's main RSS feed, using the rss2html.php script)

http://www.feedforall.com/public/layouts.htm (lots of sample pages)

http://www.small-business-software-net (the main page is actually the rss2html.php script being run)

http://www.create-rss.com (the main page is actually the rss2html.php script being run)


Advanced Notes:
---------------

Version 2.0 and later of this script use the PHP curl function to open feeds and templates. Earlier versions used fopen. If you need to use fopen for any reason, there is a setting at the beginning of the script that can be changed, to force that behavior.

Sometimes the URL of a feed you want to use with rss2html.php contains illegal characters in it. For example, you can' t use spaces, question marks, amperstans, etc in an URL. The solution is to use encoded characters in their place. The best way to do this is with a built in utility, rss2html.php?buildURL . Here is a list of illegal characters and their equivalent encodings:

% -> %25
? -> %3f
& -> %26
= -> %3d
+ -> %2b
<SPACE> -> %20

For example this feed's URL:

http://www.mynewssource.com/opensearch.php?query=pike+fishing&search=Search&type=search

Should look like this in a call to rss2html.php:

http://www.rss2html.com/public/rss2html.php?XMLFILE=http://www.mynewssource.com/opensearch.php%3fquery%3dpike%2bfishing%26search%3dSearch%26type%3dsearch


Restricting Access:
-------------------

The rss2html.php script now offers the ability to control if the feed and template are local or remote. Local files can be limited to specific file extensions. File access is controlled by the variable $fileAccessLevel, the default value is 1.


File access level:
-1 = Remote files are NOT allowed, only local files allowed for template
and feed which have filenames ending in extensions in the
$allowedTemplateExtensions and $allowedFeedExtensions lists below
0 = Remote files and any local files allowed for template and feed
1 = Remote files and only local files allowed for template and feed
which have filenames ending in extensions in the
$allowedTemplateExtensions and $allowedFeedExtensions lists below
2 = No local files allowed, remote files only.

Allowed file extensions is a list of the allowable extensions for local for the template and the feed. Below are the default values of both of the arrays:

$allowedTemplateExtensions = Array(".html", ".htm", ".shtml");
$allowedFeedExtensions = Array(".xml", ".rss");


Caching:
--------

There is now a caching module available for use with rss2html. It caches the source RSS feed on your local server (if your are running rss2html.php on your local server). This can noticably speed up page displays, and reduce bandwith usage. The caching module is available to all registered users of FeedForAll or FeedForAll Mac. It can be downloaded from here:
http://www.feedforall.com/rss-cache.htm


Copyright 2005-2007 NotePage, Inc. All rights reserved

$Id: rss2html-docs.txt,v 3.0 2007/04/16 14:23:03 housley Exp $

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
microsyntra



Joined: 30 Jan 2008
Posts: 4
Location: United States

PostPosted: Wed Jan 30, 2008 4:23 pm Reply with quoteBack to top

Tech Support wrote:
RSS2HTML PHP Script Documentation v3.x

Contents
Introduction
Uses
Quick Start
Templates
Running from FeedForAll's server
Running on local server
Example websites
Advanced Notes
Restricting Access
Caching

Introduction:
-------------

FeedForAll has made available a free PHP program called rss2html.php, which can be used by webmasters to automatically display RSS feeds on their website. The resulting webpage will always show the RSS feed's most current data. The advantage of using the rss2html.php script is that the resulting webpage's contents will always be up to date, and can be easily spidered by search engines.


Uses:
-----

- Create a webpage with an RSS feed's information
- Insert an RSS feed's information into a location in an existing webpage


Quick Start:
------------

rss2html.php has a built in utility to help get started quickly. This is done by calling rss2html.php with the parameter "buildURL", for example http://scripts.rss2html.com/public/rss2html.php?buildURL . After filling in the infomation about your feed and template you will be shown the exact code to include the output of rss2html.php into a webpage.


Templates:
----------

FeedForAll's rss2html.php script uses templates to generate its output. The templates allow you to easily control what the resulting webpage will look like. A template can be used to generate a complete webpage, or a portion of a webpage like a table (which can then be included inside an existing webpage). The template's syntax is exactly the same as the syntax used in FeedForAll's export functions.

Templates are simply standard HTML documents, with special variables inserted where the RSS feed's data should appear. Usually the easiest way to create a template is to create a sample webpage with some real data in it, and then replace the feed's data with template variables, or modify an existing webpage, by adding template variables. Here is a list of the variables supported by FeedForAll's rss2html.php script:

~~~FeedTitle~~~ (The feed's title)
~~~FeedDescription~~~ (the feed's description)
~~~FeedContentEncoded~~~ (the feed's description from optional ContentEncoded field)
~~~FeedLink~~~ (the feed's link)
~~~FeedPubDate~~~ (the feed's pub date/time in RSS format)
~~~FeedPubLongDate~~~ (the feed's date in a long date format)
~~~FeedPubShortDate~~~ (the feed's date in a short date format)
~~~FeedPubLongTime~~~ (the feed's time in a long time format)
~~~FeedPubShortTime~~~ (the feed's time in a short time format)
~~~FeedCreativeCommons~~~ (the feed's Creative Commons(R) License URL if one exists)
~~~FeedImageUrl~~~ (the URL to the feed's image)
~~~FeedImageTitle~~~ (the title for the feed's image)
~~~FeedImageLink~~~ (the link associated with the feed's image)

~~~FeedMaxItems=X~~~ (the maximum number of items to appear on the webpage - replace 'X' with a number. The first 'X' number of items in the feed will be displayed. Using a negative number for 'X' will show the last 'X' items from a feed.
~~~SortByPubDate~~~ (the items will be sorted by their PubDate, before they are displayed - newest first)
~~~NoFutureItems~~~ (items with PubDates that are in the future won't be displayed until that date/time arrives)

~~~BeginItemsRecord~~~ (repeat everything between this and the end marker, for each item)
~~~EndItemsRecord~~~ (repeat everything between this and the start marker, for each item)
~~~BeginAlternateItemsRecord~~~ (separates the ItemsRecord into alternating halves)

~~~ItemTitle~~~ (the item's title)
~~~ItemDescription~~~ (the item's description)
~~~ItemContentEncoded~~~ (the item's description from optional ContentEncoded field)
~~~ItemLink~~~ (the item's link)
~~~ItemPubDate~~~ (the item's pub date/time in RSS format)
~~~ItemPubLongDate~~~ (the items's date in a long date format)
~~~ItemPubShortDate~~~ (the item's date in a short date format)
~~~ItemPubLongTime~~~ (the item's time in a long time format)
~~~ItemPubShortTime~~~ (the item's time in a short time format)
~~~ItemEnclosureUrl~~~ (the item's enclosure URL)
~~~ItemEnclosureType~~~ (the item's enclosure MIME type)
~~~ItemEnclosureLength~~~ (the item's enclosure Length)
~~~ItemEnclosureLengthFormatted~~~ (the item's enclosure Length formatted into Kilo, Mega or Giga Bytes)
~~~ItemGuid~~~ (the item's GUID field value)
~~~ItemAuthor~~~ (the item's author field value)
~~~ItemComments~~~ (the item's comments field value)
~~~ItemSource~~~ (the item's source field value)
~~~ItemSourceUrl~~~ (the item's source url attribute value)
~~~ItemCategory~~~ (the first item's category field value)
~~~ItemCategoryDomain~~~ (the item's first category domain attribute value)
~~~ItemCreativeCommons~~~ (The Creative Commons(R) License URL of the item, or feed if there isn't one on the item but there is on the feed)

When the rss2html.php script runs, it will substitute information from the RSS feed into the location wherever a variable is found. For example, every time ~~~FeedTitle~~~ is found in the template's text, the Title from the RSS feed will be substituted.

Special variables:
The ~~~FeedMaxItems=X~~~ variable can be used to limit the number of items that will be inserted into the webpage. Replace the 'X' with a number of feed items you would like displayed (no spaces).

The ~~~BeginItemsRecord~~~ is used to mark the beginning of the section in the template, that should be repeated for each item in the RSS feed. A corresponding ~~~EndItemsRecord~~~ should be used to mark the end of the repeating section. Everything invbetween these two variables will be repeated for every item in the feed. You would typically place all your ~~~Item...~~~ variables in between the ~~~BeginItemsRecord~~~ and ~~~EndItemsRecord~~~ variables.

The ~~~BeginAlternateItemsRecord~~~ tag is optional, and can be used in between the ~~~BeginItemsRecord~~~ and ~~~EndItemsRecord~~~ variables to split the section into two halves. Everything between the ~~~BeginItemsRecord~~~ and the ~~~BeginAlternateItemsRecord~~~ will be used for odd numbered RSS feed items, and everything between the ~~~BeginAlternateItemsRecord~~~ and the ~~~EndItemsRecord~~~ will be used for even numbered RSS feed items. This is typically used to give alternating feed items a slightly different look.

Example - template used to generate a complete HTML webpage:

<HTML>
<HEAD>
<TITLE>~~~FeedTitle~~~</TITLE>
</HEAD>
<BODY>
<H1>~~~FeedTitle~~~</H1>
<BR>
<H2>~~~FeedDescription~~~</H2>
<BR>
<TABLE width="100%">
~~~BeginItemsRecord~~~
<TR>
<TD>
~~~ItemTitle~~~
</TD>
</TR>
<TR>
<TD>
~~~ItemDescription~~~
</TD>
</TR>
<TR>
<TD>
<BR>
</TD>
</TR>
~~~EndItemsRecord~~~
</TABLE>
</BODY>
</HTML>


Example - template used to generate an HTML table, for including inside existing webpage*

<TABLE WIDTH="100%">
~~~BeginItemsRecord~~~
<TR VALIGN="TOP">
<TD>
<BR>
<FONT SIZE="-1">~~~ItemPubShortDate~~~ </FONT><BR>
~~~ItemTitle~~~<BR>
~~~ItemDescription~~~<BR>
<BR>
<A HREF="~~~ItemLink~~~">more info</A>
<BR><BR>
</TD>
</TR>
~~~EndItemsRecord~~~
</TABLE>

*Server-side includes, imbedded PHP code, and other inclusion methods are outside the scope of this document.


Running rss2html.php from FeedForAll's public server:
-----------------------------------------------------

If your webserver doesn't support PHP, then you can run the rss2html.php script on FeedForAll's public server instead. All you need to do is setup a link on your website to access the script and resulting webpage.

rss2html.php has a builtin utility to help create the URLs and trouble shoot problems. It is available by adding ?buildURL,

http://scripts.rss2html.com/public/rss2html.php?buildURL

Syntax:

http://scripts.rss2html.com/public/rss2html.php?XMLFILE=<your-rss-feed>&TEMPLATE=<your-template>&MAXITEMS=<max-items>

The above URL should all be on one line, with no spaces.

Replace '<your-rss-feed>' with the full URL to your RSS feed (i.e. http://www.mydomain.com/myfeed.xml)

Replace '<your-template>' with the full URL to the webpage template you want to use (i.e. http://www.mydomain.com/mytemplate.htm)

Replace '<max-items>' with the maximum number of items from your RSS feed you want included on the webpage. The MAXITEMS variable is optional. If it is not included, all the RSS feed items will be included.

Sample:

http://scripts.rss2html.com/public/rss2html.php?XMLFILE=http://www.feedforall.com/blog-feed.xml&TEMPLATE=http://www.feedforall.com/sample-template.html

The above URL should all be on one line, with no spaces.


Running rss2html.php from your own webserver:
---------------------------------------------

Probably the best way to use rss2html.php is to upload it to your own webserver. This gives you two ways to access the script. First, you can setup a link on your webpage to access the script and resulting webpage.

Syntax:
http://<your-domain>/rss2html.php?XMLFILE=<your-rss-feed>&TEMPLATE=<your-template>&MAXITEMS=<max-items>

The above URL should all be on one line, with no spaces.

Replace '<your-domain>' with the domain of your website

Replace '<your-rss-feed>' with the full URL to your RSS feed (i.e. http://www.mydomain.com/myfeed.xml)

Replace '<your-template>' with the full URL to the webpage template you want to use (i.e. http://www.mydomain.com/mytemplate.htm)

Replace '<max-items>' with the maximum number of items from your RSS feed you want included on the webpage. The MAXITEMS variable is optional. If it is not included, all the RSS feed items will be included.

Sample:

http://feedforall.com/rss2html.php?XMLFILE=blog-feed.xml&TEMPLATE=sample-template.html&MAXITEMS=10


The second option is to edit the settings inside of the rss2html.php script itself, and then just access the script as if it were a regular webpage.

With a text editor open up the rss2html.php file. Look for the line near the beginning that looks like this:

$XMLfilename = "sample.xml";

Replace sample.xml with either the local path or full URL to your RSS feed file.

Next, find the line that looks like this:

$TEMPLATEfilename = "BasicWebpage.htm";

Replace BasicWebpage.htm with either the local path or full URL to your template file.

Finally, if you want to specify the maximum number of items to include from your feed, find the line that looks like this:

$FeedMaxItems = 10000;

Replace 10000 with the maximum number of items you want.

Save the file with a new name (what you want to call it on your website), but make sure to keep the .php extension.

For example, if you named it 'myfeed.php', you can now access it from your browser by typing: http://<your-domain.com>/myfeed.php

Sample:

http://www.feedforall.com/blog.php


Examples of the RSS to HTML PHP script in action:

http://www.feedforall.com/blog.htm (FeedForAll's main RSS feed, using the rss2html.php script)

http://www.feedforall.com/public/layouts.htm (lots of sample pages)

http://www.small-business-software-net (the main page is actually the rss2html.php script being run)

http://www.create-rss.com (the main page is actually the rss2html.php script being run)


Advanced Notes:
---------------

Version 2.0 and later of this script use the PHP curl function to open feeds and templates. Earlier versions used fopen. If you need to use fopen for any reason, there is a setting at the beginning of the script that can be changed, to force that behavior.

Sometimes the URL of a feed you want to use with rss2html.php contains illegal characters in it. For example, you can' t use spaces, question marks, amperstans, etc in an URL. The solution is to use encoded characters in their place. The best way to do this is with a built in utility, rss2html.php?buildURL . Here is a list of illegal characters and their equivalent encodings:

% -> %25
? -> %3f
& -> %26
= -> %3d
+ -> %2b
<SPACE> -> %20

For example this feed's URL:

http://www.mynewssource.com/opensearch.php?query=pike+fishing&search=Search&type=search

Should look like this in a call to rss2html.php:

http://www.rss2html.com/public/rss2html.php?XMLFILE=http://www.mynewssource.com/opensearch.php%3fquery%3dpike%2bfishing%26search%3dSearch%26type%3dsearch


Restricting Access:
-------------------

The rss2html.php script now offers the ability to control if the feed and template are local or remote. Local files can be limited to specific file extensions. File access is controlled by the variable $fileAccessLevel, the default value is 1.


File access level:
-1 = Remote files are NOT allowed, only local files allowed for template
and feed which have filenames ending in extensions in the
$allowedTemplateExtensions and $allowedFeedExtensions lists below
0 = Remote files and any local files allowed for template and feed
1 = Remote files and only local files allowed for template and feed
which have filenames ending in extensions in the
$allowedTemplateExtensions and $allowedFeedExtensions lists below
2 = No local files allowed, remote files only.

Allowed file extensions is a list of the allowable extensions for local for the template and the feed. Below are the default values of both of the arrays:

$allowedTemplateExtensions = Array(".html", ".htm", ".shtml");
$allowedFeedExtensions = Array(".xml", ".rss");


Caching:
--------

There is now a caching module available for use with rss2html. It caches the source RSS feed on your local server (if your are running rss2html.php on your local server). This can noticably speed up page displays, and reduce bandwith usage. The caching module is available to all registered users of FeedForAll or FeedForAll Mac. It can be downloaded from here:
http://www.feedforall.com/rss-cache.htm


Copyright 2005-2007 NotePage, Inc. All rights reserved

$Id: rss2html-docs.txt,v 3.0 2007/04/16 14:23:03 housley Exp $


Basically what is done here is following the instructions, then placing the two php files and the template on a server to get the results. If one is to place a code within there webpage to display the feed, could you give a true example of just what that code would look like that is placed within a webpage and what changes are made to that code to fit properly?

Thanks,

MicroSyntra
View user's profileVisit poster's website
nellietjh



Joined: 09 Feb 2010
Posts: 1

PostPosted: Tue Feb 09, 2010 7:01 pm Reply with quoteBack to top

I, too, would like to see a specific example of implementing on a web page, identifying each part of the process. I am still unclear how to get it to work.
View user's profile
FeedForAll Sales



Joined: 10 Jun 2009
Posts: 252

PostPosted: Wed Feb 10, 2010 10:03 am Reply with quoteBack to top

Have you downloaded the free rss2html.php script at http://www.feedforall.com/scripts-directory.htm, and what part of the above instructions are you at?

Examples of the script in action:

http://www.feedforall.com/blog.htm

http://www.feedforall.com/public/layouts.htm

http://www.small-business-software-net

http://www.create-rss.com

_________________
FeedForAll Sales
View user's profileVisit poster's website
feedforall



Joined: 30 Dec 2008
Posts: 66

PostPosted: Tue Mar 23, 2010 5:19 am Reply with quoteBack to top

A new version of RSS2HTML php script is now available. It includes an update for PHP 5.3. Download the latest version.

_________________
RSS Feed Editor
Audio Recording Software
View user's profileVisit poster's website
Geblibr



Joined: 15 Nov 2011
Posts: 1

PostPosted: Tue Nov 15, 2011 7:36 am Reply with quoteBack to top

feedforall wrote:
A new version of RSS2HTML php script is now available. It includes an update for PHP 5.3. Download the latest version.

I've tried to get rss feeds to run on my site and in the process of doing this, I got a 500 error on the whole website. What can be done here?
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2782

PostPosted: Tue Nov 15, 2011 4:28 pm Reply with quoteBack to top

Wait, is the 500 error on the whole website or just on the PHP script?

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme