rss

utf-8 to iso-8859-1 encoding problem

时光毁灭记忆、已成空白 提交于 2019-12-13 19:15:56
问题 I'm trying preview the latest post from an rss feed on another website. The feed is UTF-8 encoded, whilst the website is ISO-8859-1 encoded. When displaying the title, I'm using; $post_title = 'Blogging – does it pay the bills?'; echo mb_convert_encoding($post_title, 'iso-8859-1','utf-8'); // returns: Blogging ? does it pay the bills? // expected: Blogging - does it pay the bills? Note that the hyphen I'm expecting isn't a normal minus sign but some big-ass uber dash. Well, a few pixels

SimplePie Multiple Feeds Random Order

喜你入骨 提交于 2019-12-13 17:22:45
问题 I am new to SimplePie and was looking through the API and couldn't find what I needed. I need to use Simple Pie to get random articles from multiple feeds. I'll better explain my question: Here's how SimplePie gives me the feed now (in chronological order): Article 1 (CNN) Article 2 (CNN) Article 3 (CNN) Article 4 (CNN) Article 5 (CNN) Article 1 (YAHOO) Article 2 (YAHOO) Article 3 (YAHOO) Article 4 (YAHOO) Article 5 (YAHOO) Article 1 (GOOGLE) Article 2 (GOOGLE) Article 3 (GOOGLE) Article 4

simplepie not parsing google news rss feed

冷暖自知 提交于 2019-12-13 17:07:42
问题 This code works perfectly with any other rss feed but not with google news feeds. I do not know what I am doing wrong, I think it's some bug. I keep getting this error when I try to read google news feeds This XML document is invalid, likely due to invalid characters. XML error: SYSTEM or PUBLIC, the URI is missing at line 1, column 61 For example if we try the http://stackoverflow.com/feeds feeds it works nicely, but not with google news feeds. Can some one give me a hint? <?php //get the

In php, Prepare string and create XML/RSS Feed

送分小仙女□ 提交于 2019-12-13 16:32:55
问题 I want to create my own RSS/XML feed. I fetch data from the database to display, but keep getting invalid character errors. If the string has an ampersand or other strange characters in it, the XML will be invalid. I tried using urlencode and htmlentities, but these don't capture all possible characters which need to be escaped. Does anyone know of a PHP function which will prepare a string for XML output? 回答1: htmlspecialchars should be enough. But don't forget to set the 3rd parameter

Is there a PHP feed reader for both RSS and ATOM? [closed]

妖精的绣舞 提交于 2019-12-13 13:24:15
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need a PHP library/script that can retreive data from feeds, no matter if they are RSS or ATOM, because I want users to insert

Why is BeautifulSoup unable to correctly read/parse this RSS (XML) document?

…衆ロ難τιáo~ 提交于 2019-12-13 12:05:17
问题 YCombinator is nice enough to provide an RSS feed and a big RSS feed containing the top items on HackerNews. I am trying to write a python script to access the RSS feed document and then parse out certain pieces of information using BeautifulSoup. However, I am getting some strange behavior when BeautifulSoup tries to get the content of each of the items. Here are a few sample lines of the RSS feed: <rss version="2.0"> <channel> <title>Hacker News</title><link>http://news.ycombinator.com/<

How do I read a secure rss feed into a SyndicationFeed without providing credentials?

佐手、 提交于 2019-12-13 11:36:01
问题 For whatever reason, IBM uses https (without requiring credentials) for their RSS feeds. I'm trying to consume https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en with a .NET 4 SyndicationFeed. I can open this feed in a browser and it loads just fine. Here's the code: using (XmlReader xml = XmlReader.Create("https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en")) { var

How do I take an RSS feed from wordpress.com and add the newest post of the feed to another website? [closed]

我们两清 提交于 2019-12-13 09:21:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am building a static site using php files. On the index.php file, I need to dynamically pull the RSS feed of a certain wordpress.com blog. The only information I need to pull is the excerpt content of the newest post (1 post total). When the wordpress.com blog is updated, the content on the index.php file

read rss feed - android

瘦欲@ 提交于 2019-12-13 08:38:35
问题 I'm trying to develop a simple application that reads rss feeds from a certain URL and then displays the results in a list view. Here is my rss reader, which is the main thing in the app: import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserFactory; public class RssReader { private String title = null; private String link = null; private String description = null;

Error in safari/IE Error x[i].getElementsByTagName(“image”)[1] is undefined

ε祈祈猫儿з 提交于 2019-12-13 08:29:17
问题 I am trying to display an RSS feed in HTML. It works on iPad, iPhone and chrome but not in internet explorer or safari. I get an error message saying x[i].getElementsByTagName("image")[1] is undefined Does anyone know how I can get this to work? It is using an Apple RSS feed to display apps from the App Store. The error is occurring at the first document.write. I am trying to display the returned results in a table also. <html> <head> <title>RSS Apps</title> <meta http-equiv="Content-Type"