rss

rss feed with images using php

大憨熊 提交于 2019-12-02 11:52:52
I am trying to pull an rss feed through for the following rss feed http://menmedia.co.uk/manchestereveningnews/news/rss.xml I can pull this through no problem using this method: <? $xml = file_get_contents('http://menmedia.co.uk/manchestereveningnews/news/rss.xml'); // Use cURL to get the RSS feed into a PHP string variable. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://menmedia.co.uk/manchestereveningnews/news/rss.xml'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); // Include the handy XML data

how to get the value from a callback function

浪子不回头ぞ 提交于 2019-12-02 10:45:29
I am relatively new to javascript and I am facing some difficulty.I have two java script files as I have shown below. I am having trouble getting the value of the variable entry_title inside the getRss function and storing it inside the variables Rss1_title and Rss2_title . Creating a global variable and assigning it to entry_title will make things worse as I will not be able to know from which Rss url the title came from. Is there a easy way to get the value of the callback functions ? <script type="text/javascript" src="jsRss.js"></script> <script type="text/javascript" src="notification.js"

Android XML Parser skipping tags

非 Y 不嫁゛ 提交于 2019-12-02 10:27:43
I am making an reader that will read RSS Feeds. At first I wanted to use a library but realized they were failing to load some data so I decided to make my own reader. But here is the issue. It is not always that my parser returns an image, depending on the site like for this RSS The image is in the content:data while for RSS like that of BBC the image is found in the content:data I fail to get in the first iteration So i have the next item getting the image of the previous item, below is my code String title = ""; String description = ""; String link = ""; String encodedDesciption = "";

Sort date in rss from the latest

安稳与你 提交于 2019-12-02 09:51:51
How should I sort the date (latest at the top)? Currently, the date is not sorted. Below is my JSFiddle: http://jsfiddle.net/qoLg6dnu/ $(document).ready(function() { $('#divRss').FeedEk({ FeedUrl: 'https://www.google.com/finance/company_news?q=SGX:533&ei=EeiDWaGGMpXUuATxloPgAw&output=rss' }); var r = Math.floor(Math.random() * 256); var g = Math.floor(Math.random() * 256); var b = Math.floor(Math.random() * 256); $('#example, .itemTitle a').css("color", getHex(r, g, b)); $('#example').click(function() { $('.itemTitle a').css("color", getHex(r, g, b)); }); function intToHex(n) { n = n.toString

get URL from XML enclosure

匆匆过客 提交于 2019-12-02 09:48:11
http://paultan.org/feed/ In above feed I can get the img ur like http://s2.paultan.org/image/2014/12/Theo-top-10-fave-renders-108x108.jpg but in feedly.com I'm seeing other link of image, which have bigger size. I wonder how feedly can retrieve the 's content since it's not in the feed's DOM. Would this link represent the large image that you see? http://s1.paultan.org/image/2014/12/top-10-posts.jpg feedly.com may be reading the destination page once and save it in their database. From the header you have a Facebook entry as follow: <meta content="http://s1.paultan.org/image/2014/12/top-10

htaccess force ssl except for rss feeds

▼魔方 西西 提交于 2019-12-02 09:26:44
My site currently forces SSL everywhere. This is the way that I want except that it is causing issues with my RSS driven newsletter and feedburner. Due to this I need to make exceptions for my feeds. Can someone help with the proper htaccess rules to pull this off? My feeds are /feed /shop/feed /forum/discussions/feed.rss Here is my condition for forcing SSL. This works except that all RSS feeds are forced to. # Force SSL RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/forum [NC] RewriteRule ^/?(.*)$ https://photoboothowners.com/$1 [R=301,QSA,L,NE] I tried the following but it did

iTunes RSS Feed returning max. 100 items instead of 300

时光总嘲笑我的痴心妄想 提交于 2019-12-02 07:28:47
I tried the iTunes RSS generator at http://itunes.apple.com/rss/generator/ to download the newest 300 games, which gave me the RSS Feed URL http://itunes.apple.com/us/rss/newapplications/limit=300/genre=6014/xml . However, only 100 are returned, and alphabetically sorted, so the list stops at the letter E ... Did Apple restrict the amount of items one could get without updating their RSS Feed Generator? Or am I missing something? yeah, it's fairly broken. to get more data you can sign up for the enterprise data feed program. it ain't pretty. http://www.apple.com/itunes/affiliates/resources

Pulling posts from another WordPress site

别等时光非礼了梦想. 提交于 2019-12-02 06:32:45
问题 I am trying to get the 2 latest posts from my personal website, using the code below from http://codex.wordpress.org/Function_Reference/fetch_feed#Usage <h2><?php _e( 'Recent news from Some-Other Blog:', 'my-text-domain' ); ?></h2> <?php // Get RSS Feed(s) include_once( ABSPATH . WPINC . '/feed.php' ); // Get a SimplePie feed object from the specified feed source. $rss = fetch_feed( 'THISISWHEREMYURLGOES/' ); $maxitems = 0; if ( ! is_wp_error( $rss ) ) : // Checks that the object is created

Trying to Parse Only the Images from an RSS Feed

若如初见. 提交于 2019-12-02 04:38:29
First, I am a php newbie. I have looked at the question and solution here . For my needs however, the parsing does not go deep enough into the various articles. A small sampling of my rss feed reads like this: <channel> <atom:link href="http://mywebsite.com/rss" rel="self" type="application/rss+xml" /> <title>My Web Site</title> <description>My Feed</description> <link>http://mywebsite.com/</link> <image> <url>http://mywebsite.com/views/images/banner.jpg</url> <title>My Title</title> <link>http://mywebsite.com/</link> <description>Visit My Site</description> </image> <item> <title>Article One<

PHP - RSS builder

℡╲_俬逩灬. 提交于 2019-12-02 03:16:13
问题 I have a old website that generate its own RSS everytime a new post is created. Everything worked when I was on a server with PHP 4 but now that the host change to PHP 5, I always have a "bad formed XML". I was using xml_parser_create() and xml_parse(...) and fwrite(..) to save everything. Here is the example when saving (I read before save to append old RSS line of course). function SaveXml() { if (!is_file($this->getFileName())) { //Création du fichier $file_handler = fopen($this-