Author |
Message |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sat Apr 28, 2012 3:09 pm |

|
Hi there!
When trying to install the script it asks for the url of the xml file. i.e.
Replace '' with the full URL to your RSS feed (i.e. http://www.mydomain.com/myfeed.xml)
What about if you do not have the xml file? How would it work with remote RSS feeds like the ones created by indeed.com: "http://www.indeed.co.uk/rss?q=marketing&l=London"? or by yahoo pipes:
"http://pipes.yahoo.com/pipes/pipe.run?_id=9843dbdb332238522f88566466ed52c9&_render=rss"
I have given it a try by pasting any of the urls above and ... obviously it doesn't work. Is there any way to make it work? Any suggestion?
My apologies if this topic has been already discussed in the forum. I have searched and found nothing relevant.
Please help!
Thanks a lot in advance for any help!
Regards
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sat Apr 28, 2012 3:15 pm |

|
It works with any valid RSS url, whatever file type you have (.xml, .rss, etc.)
Additional params are not allowed in the input parameter.
The best way for you to know the genuine rss url is to dl a free rss reader and cut/paste the url it catches when you click on any RSS icon (this is what *I* do and it works fine... :-)
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sat Apr 28, 2012 3:54 pm |

|
I am already using a RSS displayer module to display the remote feeds from indeed.com and I need to convert the feeds into html so as the search engine of the CMS retrieves them.
However the URL's I meant on the original post do not work... As an alternative I have tried the option to create a valid xml file, but I am not pretty sure whether I can rely on its cache function:
www.seachd.com/php/rss2html.php?buildURL
.
Should I then save this xml file on my server and use it for setting up the link? If so...Will rss2html script update the feed according to the cache option? Will this save the new items in the xml file?
Thanks a lot for any help! As you see I am a bit lost
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sat Apr 28, 2012 4:17 pm |

|
Well, if you disconnect the rss feed from its origin, it will never be updated.
The tool is not an XML 2 HTML converter ! :-)
Give us the link of the RSS feed you are dealing with and I'll have a look.
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sat Apr 28, 2012 4:38 pm |

|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sat Apr 28, 2012 4:45 pm |

|
Well, to me it works very fine:
http://www.ddtl.fr/piscine/rss_reader_2.php
Try.
Source is:
$XMLFILE = "http://pipes.yahoo.com/pipes/pipe.run?_id=9843dbdb332238522f88566466ed52c9&_render=rss";
$TEMPLATE = "http://www.ddtl.fr/piscine/1002.html";
include("rss2html.php");
?>
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sat Apr 28, 2012 5:33 pm |

|
Thanks! It works for you! ;)
However when using the default template: sample-template.html, I get the error:
Code: |
$errorCode = 26
xml_error_string() = Undeclared entity error
xml_get_current_line_number() = 10
xml_get_current_column_number() = 469
xml_get_current_byte_index() = 2570
|
and I have already added to the FeedForAll_XMLParser.inc.php:
Code: |
$XMLString = str_replace(">",">", $XMLString);
$XMLString = str_replace("<","<", $XMLString);
$XMLString = str_replace("&","&", $XMLString);
|
So, I guess there are more exceptions I have to add?
If I finally get the HTML code for the RSS and paste it into my html page, would it update automatically?
Thanks for all your help!
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sun Apr 29, 2012 12:54 am |

|
Yes, an error 26 is an XML entity that is not known by the rss2html parser
No, because your HTML page is not dynamic.
I'm building the same kind of stuff as you do. The goal is obviously to have the page updated as soon as it is requested by the visitor. The only way to do so is to trigger the php first, which will get the rss data, convert them to plain text, then build your page.
Think that it is the php code which builds the html code. No way to have a static html page trigger the php code to be self-rebuild, in my opinion, but I may be wrong, of course.
Consider this tool is no more maintained since ages. We are lucky that the FeedForAll web site and Paypal system are still up and running...
Good luck.
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sun Apr 29, 2012 1:31 am |

|
Late Breaking News
Last parser version is
// $Log: FeedForAll_XMLParser.inc.php,v $
// Revision 3.24 2010/03/16 22:31:38 housley
// Fix for PHP 5.3
Available in the rssmesh.php "distribution kit".
I can send it to you if you wish. I do hope updates are free...
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sun Apr 29, 2012 6:24 am |

|
Hi there,
I think I've read somewhere that rss2html script would update the html-webpage output with the "rss contents".
So, have you figured out how to make it work out?
Could you please send me the file? THanks a lot!
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sun Apr 29, 2012 6:27 am |

|
Actually, after having reread what I have written... That's the real point of the script, isn't it?
There must be a way to trick it in a way it updates dinamically.
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sun Apr 29, 2012 6:38 am |

|
Maybe I was not inuf clear.
The "page" where your visitors arrive will not be a static HTML page with some dynamic php inside.
It is (should be) the rss2html.php script, which will get/convert and post your feed data on a new page it populates, actually from a template one (2nd § in rss2html.php)
What I'm doing is this:
I built my page with my favourite html editor, I labelled all data with the rss2html tag syntax ~~~X~~~, then I ran rsss2html.php, giving my rss feed as input #1 and my template page as param #2
Works fine !
:-)
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Sun Apr 29, 2012 7:05 am |

|
That makes more sense. However in order to implement it, I would need a further explanation when labeling all data. I am going to try anyway.
I get the same Error 26 after having overwritten the file you sent me. Should I first think about making it work and afterwards creating the page??
Thanks!
|
|
|
 |
 |
Toulousaing
Joined: 28 Apr 2012
Posts: 32
Location: Toulouse, France
|
Posted: Sun Apr 29, 2012 9:04 am |

|
Gonna be the local Guru, if this continues that way.. :-)
Here is a start of my Rss In PHP How To:
1° you need:
a) an RSS feeds provider
b) a server on which you copy rss2html.php, sample-template.html and a php script you write to trigger the whole stuff (see below).
2° you have:
a) rss2html.php, upload it
b) sample-template.html, edit it, remove the ~~~ around ItemDescription (to suppress verbose Item Descriptions) and upload it
c) Notepad++ (get it if you don't or use Notepad)
3° with rss2html.php on your server, start this command:
Code: |
http://www.myserver.com/rss2html.php?buildURL |
You (should) get this:
RSS2HTML.PHP LINK TOOL
To assist with the creation of properly encoded URLs for use with rss2html.php this tool has been created. Fill in the URLs or file paths for both the XML file and your template file in the boxes below and then click "Submit". The program will then return the URLs properly encoded in a string that calls rss2html.php. You can click on this link to test the results. The program will also indicate if it was unable to open either of the URLs it was given.
URL for the XML file: ___________________________
(ie. http://feeds.feedburner.com/GoogleOnlineSecurityBlog?format=xml)
URL for the template file: ______________________________
(ie. http://www.myserver.com/sample-template.html)
Optional items
Maximum items: _____
(Use negative numbers for the last X items, ex: -3) (enter -3)
No future items: [ ]
(check)
XML (input) Cache Settings
Allow Caching of the feed: [ ]
(leave unchecked)
Cache Time: [ ]
(The number of seconds a file may be cached for before being fetched again) (forget it)
HTML (output) Cache Settings
Output Cache Time: [ ]
(The number of seconds the output may be cached for before being recreated) (forget it)
Output Cache Name: [ ]
(This should be a unique name to prevent conflicts) (forget it)
4° Click SUBMIT
You should get this:
Results
The XML file http://feeds.feedburner.com/GoogleOnlineSecurityBlog?format=xml was SUCCESSFULLY opened
The template file http://www.myserver.com/sample-template.html was SUCCESSFULLY opened
URL for the XML file properly encoded:
http://feeds.feedburner.com/GoogleOnlineSecurityBlog%3fformat%3dxml
URL for the template file properly encoded:
http://www.myserver.com/sample-template.html
../..
Example Usage
$XMLFILE = "http://feeds.feedburner.com/GoogleOnlineSecurityBlog?format=xml";
$TEMPLATE = "http://www.myserver.com/sample-template.html";
$MAXITEMS = "-3";
include("rss2html.php");
?>
5° create an empty .php file and cut/paste the above php code into it.
save as rss_reader.php (for example)
6° upload rss_reader.php onto your server in the same location where the two previous stuff were uploaded (MANDATORY)
7° type this in your browser:
Code: |
http://www.myserver.com/rss_reader.php |
You should get this:
Google Online Security Blog
Saturday 12th March 2011
MHTML vulnerability under active exploitation
ItemDescription
Thursday 31st March 2011
Chrome warns users of out-of-date browser plugins
ItemDescription
Friday 1st April 2011
Improving SSL certificate security
ItemDescription
If you don't, come back :-)
HTH
|
|
|
 |
 |
siroco1979
Joined: 27 Apr 2012
Posts: 13
Location: London
|
Posted: Tue May 01, 2012 5:39 am |

|
Well I have no words! Thanks so much for all your support. You are already the GURU of this thread :)
Your guide was quite helpful and everything worked as it was expected to.
However I am having now a problem with the php file to implement it in Concrete5CMS. I have already tried to use the php file "rss_reader.php" as template for a new page in which I would just add header, footer and so on.
Unfortunately it does not work. I will ask in the CMS forum. I am hopefully lucky and make it work soon.
The last step would test if rss content is retrieved by the CMS search engine. If so... I would could move on with other secondary aspects of the website and would be very happy. I will let you know!
Thanks for everything!!!!
|
|
|
 |
 |
|