Forum

Newbie help with rsslib

2010-01-20 15:09:25

Commandrea

Hi there- if anyone can help me out that would be great! So I'm simply trying to put a twitter rss feed on my website using the rsslib.php file but I am getting a blank page on uploading the .html file w/ the php code. I need to know what (if anything) to add to the header, if I must have a CSS stylesheet, and how to properly call the .php file. (Do I use a <div> or <ul>? If so do I need to define the <> tags in the .php file somewhere?) Sorry for what are probably some very basic questions but I just need a little guidance to get me in the right direction. ALSO- I am coming across some sites saying there might be an issue with the php.ini file- I use 1and1(dotcom) who says I need to make a php.ini file and put it in the directory where I want my .php files? Obviously I have bit off more than I can chew so truly ANY help will be appreciated.
2010-01-22 07:46:18

scriptol

Hello You can perform two tests to verify that all can work: 1) Check the feed here: https://www.scriptol.com/rss/rss-single.php Example: I enter http://twitter.com/statuses/user_timeline/37166680.rss for the feed of Scriptol on Twitter. Verify also that PHP 5 is supported, put this code in a file with the PHP extension, for exemple: test.php:
<?php phpinfo(); ?>
And load the page with a browser. The version 5 of PHP is required. It is important that the server recognizes the extension as that of page to be interpreted. Usually, pages with a .html extension are not parsed by the PHP interpreter. The script is included anywhere in a page between these markers:
<?php
...script...
?>
Or
<?php
include_once("rsslib.php");
... call the display function with the right parameters
?>

Any special settings for the RSS Reader/s

2011-04-18 09:44:25

wattaman

Hi! I've installed the server again and tweaked a little the apache and the php. The rss and atom readers are no longer working on the new server. Here's the apache error I got: "mod_fcgid: stderr: PHP Fatal error: Class 'DOMDocument' not found in /home/atat/domains/id.atat.ro/public_html/commonlib.php on line 127" The commonlib.php script is intact. How can I make it work on the new server? Thank you!
2011-04-19 05:48:51

wattaman

Sorry, forgot to install php-xml. It is, of course, working now.

Totally lost with RssLib

2011-12-21 22:56:13

otakupahp

Ok, here is the problem: I have configured rsslib in this site: radiovision.com.ec and fetch links from many RSS resources, but in recent days the hosting provider changed the server where we were and I had to migrated the whole site again. Now, rsslib just can read some RSS (those with a clear xml extension in the path) and some can not. I tried your single-rss file and checked all "not loading RSS" still works. Since the server changed, could you please help me with the correct PHP configuration to load the missing RSS? You can check the PHP info here: radiovision.com.ec/wp-content/themes/sem-reloaded/test.php Thanks
2011-12-22 10:04:31

scriptol

There is nothing in the configuration that could conflict with the script. What are the error messages?
2011-12-22 14:23:25

otakupahp

The error is about DOM unabled to load the RSS, when the url contains something.xml it works, but I am trying with tumblr rss wich only give me "something.tumblr.com/rss" At night I´ll give you a path showing the error.
2011-12-22 20:44:51

otakupahp

As promised, here is the URL where you can check the error radiovision.com.ec/wp-content/themes/sem-reloaded/rss-single.php Thanks for any insight
2011-12-23 02:36:42

scriptol

The feed that does not work is an atom feed while the other are RSS 2.0 feed (look with the Chrome browser). They should be displayed with the [url=https://www.scriptol.com/rss/common-reader.php]commonlib[/url] library.

Validation

2011-03-03 09:33:56

spooky

First of all, I would like to say - big thanks for excellent rsslib_dot_php This is actually the best script for both atom/rss formats on the internet - no doubts at all. However, there was one thing I had to add to the script in order to escape those characters such as &<>" ... Just one line for both RSS_Links() and RSS_Display() functions. All it needed was this:
$link = htmlentities($link, ENT_QUOTES);   
I added that new line just below this
....
$title = $article["title"];
$link = $article["link"];    
...and afterwards, no more Validation Errors! :) Yipeey! :D I had an issue with YouTube feeds. Not anymore.. :) Check it out on spookycorp dot com slash music dot php (the left part of the screen) All those feed links are now with "&" and completely functional. Those who care about valid html pages and do have needs for rss on their websites, should do the same. Cheers good people.
2011-03-03 12:13:13

scriptol

Thanks you for the info very much. It will be taken into account in the next update.
2011-03-04 04:37:44

spooky

Now this is something that would put a smile on anyone's face. :) However, once again, THANK YOU for such effort regarding script it self. I have tried dozen of various php approaches for rss, and thrust me, your scriptol work is - bullet fast, clean.. perfect. Just what any webmaster should use for rss. Implementation, documentation, etc.. everything.. is written for any "brain" to understand and to apply. Not to mention simple, readable design for scriptol_dot_com website it self. Lovely. :) Live long and prosper.

RSSLib - Date

2010-04-29 23:47:49

hodgesmr

Is there an easy way to get the pubDate from RSS feeds using RSSLib? I can't tell where/how to add such functionality.
2010-05-01 13:33:39

scriptol

The last version, uploaded today, includes the date.
2010-05-01 14:32:40

hodgesmr

Thanks for pointing me in the right direction. That's exactly what I was looking for! A side note: It appears that the PHP function strtotime() can't handle the conversion from pubDate format. Oh well..

Can I display the timestamp for each RSS feed item?

2010-03-17 11:49:16

clrseo

Using PHP RSS reader, it works wonderfully displaying the title, link and description, but can it also provide the date of each item displayed? I am using it to display recent postings from my wordpress blog on my homepage. Thanks in advance
2010-03-17 13:13:03

scriptol

The last version display the date and time.
2010-03-17 18:19:45

clrseo

WONDERFULL!!!! Thanks so much.. One followup question: it displays the timestamp as: Wed, 25 Nov 2009 12:27:35 +0000 how can I remove the '+0000' ?
2010-03-18 14:35:01

scriptol

We could work on the date format, but a PHP instruction is simpler:
$date = substr($date, 0, strpos($date, "+000"));

Does the PHP RSS Reader work in Yahoo Small Business Sites

2011-05-25 15:01:09

corderi

I have uploaded the PHP RSS Reader to my site "as is" and can't get it to display the feeds. It seems to run and I get no errors, but feeds are not displayed. Has any one installed this script and had it run in yahoo small business sites? Yahoo states that they are running PHP Version 5.2.12 which I confirmed.
2011-05-26 01:49:20

scriptol

The RSS reader works with Yahoo! News. For another feed I need the URL to answer. You should check the feed on the RSS online demo
2011-05-26 08:01:06

corderi

Let me rephrase my post. It is not the actual feed, but the script itself that does not seem to be functioning. My site is hosted by Yahoo Small Business. I uploaded all the RSS files to my site, but none of the demos work at my site. I have not made any changes to the original scripts, I just entered diferrent feeds addresses in the demos, but nothing gets displayed.
2011-05-26 12:19:37

scriptol

What is the version of PHP?
2011-05-26 14:44:52

corderi

PHP Version 5.2.12 which I confirmed using the phpinfo(); function.
2011-05-27 13:19:49

scriptol

Try the curl test script to see what happens...
<?php
$url="";
$hnd=curl_init();
curl_setopt($hnd,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($hnd,CURLOPT_URL,$url);
$page=curl_exec($hnd);
curl_close($hnd);
$doc=new DOMDocument("1.0");
$doc->loadXML($page);
echo $doc->saveXML();
?>
Assign the url of the feed to $url and save the code in test.php of the site.

Scriptol I hope you are still around -RSSLIB

2010-03-08 11:59:37

lefloresg80

I've put the code necessary for running rsslib and I'm getting the following errors
Warning: domdocument() expects at least 1 parameter, 0 given in  "..."/rsslib.php  on line 71

Fatal error: Call to undefined function: load() in "..."/rsslib.php on line 72
I hope to hear from you soon! Thanks in advance! Luis
2010-03-08 13:17:16

scriptol

Hello, try this demo with your feed: https://www.scriptol.com/rss/rss-single.php It it works, download the source of the demo: https://www.scriptol.com/rss/rsslib.txt Change .txt to .php. If it does not work verify you have PHP 5 installed with phpinfo(). The DOMDocument constructor has two optional arguments and so, no parameter is really required. What is your version of PHP?
2010-03-08 13:27:04

lefloresg80

Found my problem! I did some more digging and I realized my php version was 4.3 so I cchanged it to 5 hopefully I won't have any problems!
2010-03-08 13:28:04

lefloresg80

Thank you very much Scriptol! I appreciate it! Cheers!
2010-03-08 15:23:33

lefloresg80

I do have another question, and hopefully I'll solve it before you need to reply. Is there anyway to format the printed href to delete the underline and change the color?
2010-03-09 13:03:13

scriptol

Yes. You have to change this line:
$page .= "<li><a href=\"$link\">$title</a></li>\n";
into
$page .= "<li><a class="rssclass" href=\"$link\">$title</a></li>\n";
and assign some CSS rule to the class:
.rssclass
{
   text-decoration:none;
   color:black;
}
If it does not work you can assign the class to the <li> tag and change the CSS into:
.rssclass > a:link, .rssclass > a:visited
{
   text-decoration:none;
   color:black;
}