FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 rss2html.php usage examples View next topic
View previous topic
Post new topicReply to topic
Author Message
Chassm



Joined: 23 Jan 2008
Posts: 8
Location: California

PostPosted: Wed Jan 23, 2008 10:52 pm Reply with quoteBack to top

Thanks for replying. Well, I made some changes, and I wish I could report good news but no. I basically started all over. I'm using a different index template now.

Here's what I have in the rss2html.php file for the XMLFILE source:

$XMLFILE[] = "http://prweb.com/xml/finance.xml";

And the table template:

$TEMPLATEfilename = "table.php";

I've tried this now with the index and table files with the .html and php extensions. I've been running the rss2html.php?buildURL tool and I enter my feed address: http://prweb.com/xml/finance.xml and then I enter the table location below. Everything runs successfully, but when I test the link, the page is empty. Below that link is the output of configs I could enter in the index.php file:

Server Side Include:
<!--#INCLUDE VIRTUAL="rss2html.php?XMLFILE=http://prweb.com/xml/finance.xml&TEMPLATE=http://www.weewaw.com/table.php&MAXITEMS=5" -->

Prefered PHP Include:
<?php
$XMLFILE = "http://prweb.com/xml/finance.xml";
$TEMPLATE = "http://www.weewaw.com/table.php";
$MAXITEMS = "5";
include("rss2html.php");
?>

PHP Include (Due to security concerns many ISP have configured their servers to prevent this from working):

<?php
include("http://www.weewaw.com/rss2html.php?XMLFILE=http://prweb.com/xml/finance.xml&TEMPLATE=http://www.weewaw.com/table.php&MAXITEMS=5");
?>

I used the last one, and tried to display it, but nothing shows up. So that's where I am right now. I'm sure I dorked something up, please help.

Chas.

_________________
Thanks,
Chas.
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Sat Jan 26, 2008 7:26 pm Reply with quoteBack to top

Chassm wrote:
Thanks for replying. Well, I made some changes, and I wish I could report good news but no. I basically started all over. I'm using a different index template now.

Here's what I have in the rss2html.php file for the XMLFILE source:

$XMLFILE[] = "http://prweb.com/xml/finance.xml";


That won't work in the simplest form because it is creating an array of filenames and rss2html.php won't know what to do with them.

Chassm wrote:

And the table template:

$TEMPLATEfilename = "table.php";

I've tried this now with the index and table files with the .html and php extensions. I've been running the rss2html.php?buildURL tool and I enter my feed address: http://prweb.com/xml/finance.xml and then I enter the table location below. Everything runs successfully, but when I test the link, the page is empty. Below that link is the output of configs I could enter in the index.php file:

Server Side Include:
<!--#INCLUDE VIRTUAL="rss2html.php?XMLFILE=http://prweb.com/xml/finance.xml&TEMPLATE=http://www.weewaw.com/table.php&MAXITEMS=5" -->

Prefered PHP Include:
<?php
$XMLFILE = "http://prweb.com/xml/finance.xml";
$TEMPLATE = "http://www.weewaw.com/table.php";
$MAXITEMS = "5";
include("rss2html.php");
?>

PHP Include (Due to security concerns many ISP have configured their servers to prevent this from working):

<?php
include("http://www.weewaw.com/rss2html.php?XMLFILE=http://prweb.com/xml/finance.xml&TEMPLATE=http://www.weewaw.com/table.php&MAXITEMS=5");
?>

I used the last one, and tried to display it, but nothing shows up. So that's where I am right now. I'm sure I dorked something up, please help.

Chas.


The file you are putting all there of these in, is it a .shtml for the first? Or a .php for either of the last two?

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
Chassm



Joined: 23 Jan 2008
Posts: 8
Location: California

PostPosted: Sat Jan 26, 2008 9:56 pm Reply with quoteBack to top

Jim,
I actually got past this part, the only other problem I'm having now is with configuring this so that I get a different feed at a different page on the same site. You responded to my question at this thread: http://www.feedforall.com/forum/viewtopic.php?p=13564#13564 so I'm going to continue my queries there.

Thanks.

_________________
Thanks,
Chas.
View user's profile
microsyntra



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

PostPosted: Wed Jan 30, 2008 2:33 pm Reply with quoteBack to top

Chassm wrote:
Jim,
I actually got past this part, the only other problem I'm having now is with configuring this so that I get a different feed at a different page on the same site. You responded to my question at this thread: http://www.feedforall.com/forum/viewtopic.php?p=13564#13564 so I'm going to continue my queries there.

Thanks.


I'm curious about this as well and also, if you want more than two feeds on the same page, but in different locations on one page and the ability to set different width's for each.
View user's profileVisit poster's website
Chassm



Joined: 23 Jan 2008
Posts: 8
Location: California

PostPosted: Wed Jan 30, 2008 2:59 pm Reply with quoteBack to top

microsyntra wrote:
Chassm wrote:
Jim,
I actually got past this part, the only other problem I'm having now is with configuring this so that I get a different feed at a different page on the same site. You responded to my question at this thread: http://www.feedforall.com/forum/viewtopic.php?p=13564#13564 so I'm going to continue my queries there.

Thanks.


I'm curious about this as well and also, if you want more than two feeds on the same page, but in different locations on one page and the ability to set different width's for each.


Hi microsyntra,
I actually got past this part as well, the way I did it was by creating two different table templates (the original used to be the sample-template.html file) and named them table1.html and table2.html. Then using the rss2html.php?buildURL I was able to configure each with a different RSS feed. Both tables should be at the root directory of your webserver, or whereever your index.html or whatever page you plan on displaying the feed on. Also if you're going to display this on your index.html file, you'd want to change the name to index.php. Then edit that file and enter the 3rd code example from the rss2html.php?buildURL output where you want the feed to appear. It's the part that appears in red.

You can definitely manipulate the width of the display by using <table width"...."> tags in the table.html file.

It's a bit confusing but workable. Hope this helps.
Good luck.
Chas.

_________________
Thanks,
Chas.
View user's profile
microsyntra



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

PostPosted: Wed Jan 30, 2008 8:18 pm Reply with quoteBack to top

Chassm wrote:
microsyntra wrote:
Chassm wrote:
Jim,
I actually got past this part, the only other problem I'm having now is with configuring this so that I get a different feed at a different page on the same site. You responded to my question at this thread: http://www.feedforall.com/forum/viewtopic.php?p=13564#13564 so I'm going to continue my queries there.

Thanks.


I'm curious about this as well and also, if you want more than two feeds on the same page, but in different locations on one page and the ability to set different width's for each.


Hi microsyntra,
I actually got past this part as well, the way I did it was by creating two different table templates (the original used to be the sample-template.html file) and named them table1.html and table2.html. Then using the rss2html.php?buildURL I was able to configure each with a different RSS feed. Both tables should be at the root directory of your webserver, or whereever your index.html or whatever page you plan on displaying the feed on. Also if you're going to display this on your index.html file, you'd want to change the name to index.php. Then edit that file and enter the 3rd code example from the rss2html.php?buildURL output where you want the feed to appear. It's the part that appears in red.

You can definitely manipulate the width of the display by using <table width"...."> tags in the table.html file.

It's a bit confusing but workable. Hope this helps.
Good luck.
Chas.


Hey Chas,

I'm glad to have your attention and input.

The biggest problem I am having is understanding if I am suppose to actually add any information to the template that came with the zip file or simply leave it as it is. Really it does not say replace this with this... know what I mean, as for as the template. I know that I am suppose to make changes in the rss2html.php.

Another thing... maybe I'm missing something here altogether. As we all know, that when provided instructions from most anything, it really does not go into step by step details in what to do, because they must think you are already a wiz at what they know.

Lets look at something a different way for a sec, maybe then I can begin to understand.

There is a FeedForAll_XMLParser.inc file

There is a rss2html file

There is a template file

When all is said and done, are we still just working with 3 files or is there a 4 that is created, as in the actual webpage that is displaying the feed in a table and if so, does the webpage that has the feed displayed, is it pulling the info from the template page or the rss2html file?

I hope you see how confusing this is for me, but I'm sure there are many others that are scratching there head, trying to figure this out.

It would have been awesome for FeedForAll to give actual working examples and a Step 1, Step 2, Step 3 etc, so that most anyone with little knowledge of this new RSS thingy would have been able to get it to work correctly in there first go of it.

Although, it would be great if FeedForAll would come up with How To Videos to explain the process, without skipping any details and/or show a blueprint of how it all connects together.

Please help, still confused here. I need actual working examples.

Believe me, I don't want to give up on the whole idea of adding feeds to my websites, because I stand a very good chance at making tons of money when all of this is coupled together with other projects that I have going on.

Respectfully,

MicroSyntra
View user's profileVisit poster's website
Chassm



Joined: 23 Jan 2008
Posts: 8
Location: California

PostPosted: Wed Jan 30, 2008 9:40 pm Reply with quoteBack to top

microsyntra wrote:

Hey Chas,

I'm glad to have your attention and input.

The biggest problem I am having is understanding if I am suppose to actually add any information to the template that came with the zip file or simply leave it as it is. Really it does not say replace this with this... know what I mean, as for as the template. I know that I am suppose to make changes in the rss2html.php.

Another thing... maybe I'm missing something here altogether. As we all know, that when provided instructions from most anything, it really does not go into step by step details in what to do, because they must think you are already a wiz at what they know.

Lets look at something a different way for a sec, maybe then I can begin to understand.

There is a FeedForAll_XMLParser.inc file

There is a rss2html file

There is a template file

When all is said and done, are we still just working with 3 files or is there a 4 that is created, as in the actual webpage that is displaying the feed in a table and if so, does the webpage that has the feed displayed, is it pulling the info from the template page or the rss2html file?

I hope you see how confusing this is for me, but I'm sure there are many others that are scratching there head, trying to figure this out.

It would have been awesome for FeedForAll to give actual working examples and a Step 1, Step 2, Step 3 etc, so that most anyone with little knowledge of this new RSS thingy would have been able to get it to work correctly in there first go of it.

Although, it would be great if FeedForAll would come up with How To Videos to explain the process, without skipping any details and/or show a blueprint of how it all connects together.

Please help, still confused here. I need actual working examples.

Believe me, I don't want to give up on the whole idea of adding feeds to my websites, because I stand a very good chance at making tons of money when all of this is coupled together with other projects that I have going on.

Respectfully,

MicroSyntra


Hey MicroSyntra,
Well yeah video steps would have been great, but this script is actually free. I came to this forum pretty much in the same boat, I got the basic idea for what this is supposed to accomplish, but the actual steps to make it work were a little fuzzy.

Ok so when you unzip the file, yes you'll have:
FeedForAll_XMLParser.inc.php
rss2html.php
sample-template.html

rss2html-docs.txt

The .txt file is just instructions, you don't want to mess with the FeedForAll_XMLParser.inc.php, this is the parser, this what translates your feeds into readable pages on your site, at least that's my impression. You also don't want to mess too much with the rss2html.php, you should only touch this one when you're a little more advanced, for now you should use the easier way which is what I did.

First you can take that sample-template.html and rename it to something else, like table.html or you can keep it the same. Then upload all these files to your web server, they'll need to be in the same directory as all your .html files like you're index.html, about.html etc.

Then you need to go to your web browser and type in the address bar the following: www.yourdomainname.com/rss2html.php?buildURL. This will bring up a tool that will ask you for the source of the RSS feed, you might for example have www.prweb.com/xml/financial.xml. Then on the second field it's asking you for the page where you want to parse this feed. Then you enter www.yourdomainname.com/table.html (or sample-template.html if you didn't change it) select the number of feeds you want to display and hit submit.

You should get SUCCESSFULLY OPENED for both the feed and the table.html file. Then if you scroll down a little you'll see some text in red. These are the different variations of the code that you can use, but you only need one to put on your regular page where you want the feed to display. For instance your index.html, I would recommend you use the last version of the code which should look something like this:

<?php
include("http://www.yourdomainname.com/rss2html.php?XMLFILE=
http://news.search.yahoo.com/news/rss;_ylt%3dA9j8eu3a0JpHBj0
B8DjQtDMD;_ylu%3dX3oDMTA3MTBsZGZsBHNlYwNhZG0-%3fei%3d
UTF-8%26p%3dbankruptcy%2bcrisis%26c%3d%26eo%3dUTF-8&
TEMPLATE=www.yourdomainname.com/table.html&MAXITEMS=5");
?>


And basically what you're doing here is calling the table.html page to display on your main page. When you insert this code you can use regular html tags like <div> or <table> to encase it. Also if you use this version of the code you'll need to change your index.html file to index.php for it to work.

You can also edit the table.html file if you want, you can control what gets displayed there too. Try it first without any editing and after the first time and you see it working I think you'll get it.

Anyways, hope that helps.
Chas.

_________________
Thanks,
Chas.
View user's profile
greenorganic



Joined: 01 Dec 2008
Posts: 1

PostPosted: Mon Dec 01, 2008 6:34 pm Reply with quoteBack to top

Hi,

I tried to do it as you explained but got an error(Chas explanation):

$errorCode = 7
xml_error_string() = mismatched tag
xml_get_current_line_number() = 18
xml_get_current_column_number() = 281
xml_get_current_byte_index() = 1610

Any idea what I did wrong. I am running on Linux. Please help. Thanks.
View user's profile
m.furqan.latif



Joined: 27 Jun 2009
Posts: 1

PostPosted: Sat Jun 27, 2009 10:39 am Reply with quoteBack to top

First, are you using Apache as your web server?

Are server side includes enabled for the file extension of your page?

_________________
Eye Glasses
http://www.frames4sale.com
View user's profile
Kimberly



Joined: 10 Sep 2009
Posts: 2

PostPosted: Thu Sep 10, 2009 8:15 am Reply with quoteBack to top

Tech Support wrote:


Example 3: Using a server side inclusion to insert a RSS feed's contents into an existing webpage

Requirements:
PHP 4.x running on your webserver
Server Side Inclusions support on your webserver

Steps:
1. Download our free rss2html.php script from: http://www.feedforall.com/download/rss2html.zip

2. Extract the files and put them on your webserver (in the same folder that your new webpage, and your RSS feed will be in)

3. Create a template for rss2html.php, that will result in the 'guts' of a table.
    a. Example:
    Code:
    ~~~BeginItemsRecord~~~
    <TR>
        <TD>
            ~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
        </TD>
    </TR>
    <TR>
        <TD>
            <B><A href="~~~ItemLink~~~">~~~ItemTitle~~~</A></B>
        </TD>
    </TR>
    <TR>
        <TD>
            ~~~ItemDescription~~~
            <BR>
            <BR>
        </TD>
    </TR>
    ~~~EndItemsRecord~~~

    b. Save your template into the same folder as the rss2html.php script and your RSS feed file


4. Create a new webpage that you want your RSS feed displayed in.
    a. In the new webpage, create a new table, and put only a server side include command in the table.
    b. Example
    Code:
    <TABLE>
        <!--#INCLUDE VIRTUAL="rss2html.php?TEMPLATE=(name the template you created in step 3)&XMLFILE=(name of your RSS feed file)" -->
    </TABLE>

    c. Save your new webpage in the same folder as the rss2html.php script and your RSS feed file
    d. Most servers will require you to save the new webpage with .shtml as the extension (instead of .htm or .html), so the server will know to look for SSI commands in the webpage.





Hello, I have question and I like to add that I am really not a technical person but do get the basic php includes.

Use this Example 3 I was able to get a feed converted to shtml. http://www.momsbreak.com/printable/test.shtml

My goal here is to get one of your template running with http://www.momsbreak.com/printable/test.shtml but make it show at http://www.momsbreak.com/ as well as other web sites I own.

I am trying to cross run feeds between several sites without using a service and having them in nice templates. Then use the feedburner as a way for them to subscribe to the feed.

Thank you
Kimberly
View user's profile
Kimberly



Joined: 10 Sep 2009
Posts: 2

PostPosted: Mon Sep 14, 2009 7:04 am Reply with quoteBack to top

Never mind, I can use includes php codes. I did not see what was right in from of me.

Kimberly
View user's profile
JayWiz



Joined: 17 Sep 2009
Posts: 1
Location: Indonesia

PostPosted: Sat Sep 19, 2009 4:26 am Reply with quoteBack to top

Thanks for the complete tutorial. It helps me a lot to convert rss to html.
I am following the guide step by step now. Thanks again.
View user's profile
iraveesh



Joined: 14 Oct 2009
Posts: 1

PostPosted: Wed Oct 14, 2009 6:22 am Reply with quoteBack to top

I am not very adept in php. I am facing a very funny problem.

I followed the tutorial and that resulted in the following URL

http://quizblog.in/test/rss2html.php?XMLFILE=http://pipes.yahoo.com/pipes/pipe.run?_id=0c600000213eba4949feed282906f6f3&_render=rss&TEMPLATE=http://quizblog.in/test/sample-template.html

This gives me a error message $errorcode = 76

But when I edited the php file directly and uploaded the file to the server, it worked..

http://quizblog.in/test/today.php

What can be the reason?
View user's profile
sreesai



Joined: 06 Jan 2010
Posts: 1

PostPosted: Wed Jan 06, 2010 4:17 pm Reply with quoteBack to top

hello i am new to this
i tried the rss feed directly by uploading on to my site the php.. it worked

but when i generated server side include by using the build page opens but no feed. i dont have any idea about my servers used for hosting please help
below is the build i used


The XML file http://www.cnet.co.uk/feeds/public/rss_crave.htm was SUCCESSFULLY opened

The template file www.googleinfo7.com/sree.html was SUCCESSFULLY opened

URL for the XML file properly encoded:
http://www.cnet.co.uk/feeds/public/rss_crave.htm


URL for the template file properly encoded:
www.googleinfo7.com/sree.html
Test Link

Click on link to view results: http://www.doctor2consult.com/GOOGLEINFO7.COM/rss2html.php?XMLFILE=http://www.cnet.co.uk/feeds/public/rss_crave.htm&TEMPLATE=www.googleinfo7.com/sree.html
Example Usage

Server Side Include:
<!--#INCLUDE VIRTUAL="rss2html.php?XMLFILE=http://www.cnet.co.uk/feeds/public/rss_crave.htm&TEMPLATE=www.googleinfo7.com/sree.html" -->

Prefered PHP Include:
<?php
$XMLFILE = "http://www.cnet.co.uk/feeds/public/rss_crave.htm";
$TEMPLATE = "www.googleinfo7.com/sree.html";
include("rss2html.php");
?>

PHP Include (Due to security concerns many ISP have configured their servers to prevent this from working):
<?php
include("http://www.doctor2consult.com/GOOGLEINFO7.COM/rss2html.php?XMLFILE=http://www.cnet.co.uk/feeds/public/rss_crave.htm&TEMPLATE=www.googleinfo7.com/sree.html");
?>
View user's profile
tjallen



Joined: 18 May 2010
Posts: 2

PostPosted: Tue May 18, 2010 11:08 am Reply with quoteBack to top

I put multiple feeds on a page by using iframes, as many as 8 on a page, it seems to work well.

Here is some example code, to paste into a page and then modify yourself. Of course change the urls to your own urls:

<iframe src="http://your-url.com/rss2html/rss2html.php?XMLFILE=http://www.solarindustrymag.com/rss/rss.xml&amp;TEMPLATE=http://your-url.com/rss2html/yourtemplate.html&amp;MAXITEMS=10" width="265" height="200" scrolling="auto" frameborder="0" allowTransparency="true" marginheight="0" marginwidth="0" style="border:solid 1px navy;margin:10px auto 0px auto;">
</iframe>
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