Hello,
I used this
function returnObject($text) {
$text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');
$pattern = "/\<object[^>]+\>(.+?)\<\/object\>/i";
preg_match($pattern, $text, $matches);
$object = $matches[0];
return $object;
}
But then I found that simplepie removes these objects tags from the code so I'm
wondering... is there any other way to get the <object - </object> code from the
content?
Thanks.
making a wordpress plugin and, i get this error...
"
A feed could not be found at
:http://news.google.com.au/news?pz=1&cf=all&ned=au&hl=en&output=rss
"
im processing multiple feeds in a loop, 2 of them are working (my blog), and all
feeds from news.google.com.au seem to be erroring out...
i made a small script with fsockopen, and the feed seems to be coming through,
and is valid!
i even upgraded simplepie "core" to the latest version, and it does not seem to
be working still....
am i missing something.
Thanx in advance.
M.
Great suggestion. Thanks
--- In simplepie-support@yahoogroups.com, Tim Hawkins <tim.hawkins@...> wrote:
>
> Implement a rate management system
>
> start off with a refresh rate of 1 min, if you get no new items, then double
it, if you get new items then halve it, your system will soon home in on a
suitable update rate for each feed.
>
> On Nov 25, 2009, at 3:59 AM, cybler wrote:
>
> > Hey there, I'm building an app that will aggregate many feeds into one page
and I want the content to be as fresh as possible.
> >
> > Are there any written/unwritten rules about how often you can check in with
an RSS publisher? Will publishers block you if you're constantly pinging their
servers for updates?
> >
> > I would like to check in with publishers from around every 1 to 5 minutes.
> >
> > Thanks
> >
> > David B.
> >
> >
>
I installed/have:
Simplepie version 1.2
Apache Server
PHP version 5
I am trying to get these modules to work:
rssmerger.php
I get the error message without any details:
Feed contains code errors
I made sure the simplepie.inc file location was ../simplepie.inc - one directory
level up from the rssmerger.php file.
I don't know what the problem is. Please help!
Thanks!
Sheri
rssmerger.php:
=================
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss version="2.00">
<channel>
<title>Aggregated Feed Demo</title>
<link>http://www.webmaster-source.com</link>
<description>
A demo of SimplePie's feed-merging capabilities.
</description>
<language>en-us</language>
<?php
include_once('../simplepie.inc');
$feed = new SimplePie(); // Create a new instance of SimplePie
$feed->set_feed_url(array(
'http://2020science.org/2009/09/14/nanotechnology-safety-ten-useful-resources/fe\
ed/'
));
$feed->set_cache_duration (3000); //The cache duration
$feed->enable_xml_dump(isset($_GET['xmldump']) ? true : false);
$success = $feed->init(); // Initialize SimplePie
$feed->handle_content_type(); // Take care of the character encoding
?>
<?php if ($success): ?>
<? $itemlimit=0; ?>
<?php foreach($feed->get_items() as $item): ?>
<? if ($itemlimit==10) { break; } ?>
<item>
<title><?echo $item->get_title(); ?></title>
<link><? echo $item->get_permalink(); ?></link>
<description>
<? echo $item->get_description(); ?>
</description>
</item>
<? $itemlimit++ ?>
<?php endforeach; ?>
<?php endif; ?>
</channel>
</rss>
start off with a refresh rate of 1 min, if you get no new items, then double it, if you get new items then halve it, your system will soon home in on a suitable update rate for each feed.
On Nov 25, 2009, at 3:59 AM, cybler wrote:
Hey there, I'm building an app that will aggregate many feeds into one page and I want the content to be as fresh as possible.
Are there any written/unwritten rules about how often you can check in with an RSS publisher? Will publishers block you if you're constantly pinging their servers for updates?
I would like to check in with publishers from around every 1 to 5 minutes.
Hey there, I'm building an app that will aggregate many feeds into one page and
I want the content to be as fresh as possible.
Are there any written/unwritten rules about how often you can check in with an
RSS publisher? Will publishers block you if you're constantly pinging their
servers for updates?
I would like to check in with publishers from around every 1 to 5 minutes.
Thanks
David B.
Hello fpeoplecome ,
Thanks for the response BUT, i dont know what you mean by "content" part. (and
ofcourse, im looking at newsblock.inc.php) unless theres another place to look.
Couldnt we just make another function by coping "listing" or "wide" -- or
somehow combine the two so that it "automagically" detects the image in the feed
and give you an option to show image with a render option like: 'image-show=>
true,' -- or something like that
anyway.. any other thoughts?
--- In simplepie-support@yahoogroups.com, "Porsche" <porscheheritage@...> wrote:
>
> Hello All,
>
> I've been trying all day for images to appear in the "LISTING"
>
> I've looked at the newsblock.inc.php file and cant figure it out..
>
> any suggestions?
>
Hello All,
I've been trying all day for images to appear in the "LISTING"
I've looked at the newsblock.inc.php file and cant figure it out..
any suggestions?
I read the tutorial on the single and multi feed ajax, but the problem with the
multi version is you need a separate box for each feed. How do you merge feeds
from say digg.com, google.com, cnn.com ect into one ajax feed box where each
feed item is in chronological order?
modify the update_feed.js into an array I suppose?
// Set feed urls
var feeds = createArray(
"http://finance.yahoo.com/rss/economy",
"http://feeds.feedburner.com/TheBigPicture");
The solution is: You MUST have either mbstring or iconv installed. PHP 5.0 and
newer has iconv built-in.
--
Ryan Parman
<http://ryanparman.com>
Please don't email/IM me directly. That's why we have a mailing list. ;)
On Nov 20, 2009, at 9:06 AM, vipmilton wrote:
> I haven't received a reply to my previous post.
>
> I did a search and there are several posts by others on different web sites of
this error but no response solutions.
>
> I ran the sp_compatibility_test.php web page again.
>
> The results indicated my server has
>
> PHP 4.4.0
>
> 1.PHP: You are running a supported version of PHP. No problems here.
>
> also
>
> 6. mbstring and iconv: You do not have either of the extensions installed.
This will significantly impair your ability to read non-English feeds, as well
as even some English ones. Check the Supported Character Encodings chart to see
what's supported on your webhost.
>
> Would number 6. indicate the cause of the 'The data could not be converted to
UTF-8' error.
>
> I have tried a number of different urls in the line of code
>
> $feed = new SimplePie('http://simplepie.org/blog/feed/');
>
> and I always get a 'The data could not be converted to UTF-8' error.
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
I haven't received a reply to my previous post.
I did a search and there are several posts by others on different web sites of
this error but no response solutions.
I ran the sp_compatibility_test.php web page again.
The results indicated my server has
PHP 4.4.0
1.PHP: You are running a supported version of PHP. No problems here.
also
6. mbstring and iconv: You do not have either of the extensions installed. This
will significantly impair your ability to read non-English feeds, as well as
even some English ones. Check the Supported Character Encodings chart to see
what's supported on your webhost.
Would number 6. indicate the cause of the 'The data could not be converted to
UTF-8' error.
I have tried a number of different urls in the line of code
$feed = new SimplePie('http://simplepie.org/blog/feed/');
and I always get a 'The data could not be converted to UTF-8' error.
On Thu, Nov 19, 2009 at 10:13 PM, thornj1 <jeff.thorn@...> wrote:
> Tim - I am very intrigued by your comment about using two different machines.
I am using SimplePie to cache feeds and make them available as a web service to
some of my other applications (java and php). I am noticing a significant
bottleneck coming from one of my java applications that use multiple threads.
Could the same PHPSESSION ID lock be happening for that java client? Is there
any way to resolve it?
I dont know much about Java. But I think if you initiate your request
objects (in C# its called HTTPWebRequest) in each thread itselft, It
may be resolved. May be you are initiating your webclient before you
start threading. Then you pass the webclient to the threads. So every
thread is sharing same webclient. So the same PHPSESSION ID is shared
too. When you initiate the webclient in each thread separately each
one will have different PHPSESSION.
Make any sense?
> Thanks,
> Jeff
>
> --- In simplepie-support@yahoogroups.com, Tim Hawkins <tim.hawkins@...> wrote:
>>
>> Try it from two seperate machines, you may be experiencing a locking
>> issue on your sessions, if you have two browser windows open on the
>> same server on the same machine, they have the same PHPSESSION id,
>> when you use files or memcache sessions the session is locked for the
>> duration of the page execution, which means that if you hit the same
>> site from two browser windows one will not load until the other page
>> completes sending its data.
>>
>> On 3 Sep 2009, at 21:41, zotium wrote:
>>
>> > I'm currently working on http://thedailyreviewer.com and everything
>> > was great with SimplePie until recently when the traffic started
>> > coming in, the app is experiencing "bottleneck" issues. Upon
>> > investigation, it seems that SimplePie is fetching feeds one by one,
>> > even if I hit several pages simultaneously (which would mean several
>> > instances of the script running) , a page would only load after the
>> > previous one loads.
>> >
>> > Does anybody know how to work around this limitation?
>> >
>> > Cheers!
>> >
>> > Rick Ong
>> > Azure Web Design
>> > Mobile: +63-928-5542750
>> > YM: zotium
>> > Skype: zotium1
>> >
>> >
>> >
>>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
--
A K M Mokaddim
http://talk.cmyweb.nethttp://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক à¦à¦¾à¦²
Tim - I am very intrigued by your comment about using two different machines. I
am using SimplePie to cache feeds and make them available as a web service to
some of my other applications (java and php). I am noticing a significant
bottleneck coming from one of my java applications that use multiple threads.
Could the same PHPSESSION ID lock be happening for that java client? Is there
any way to resolve it?
Thanks,
Jeff
--- In simplepie-support@yahoogroups.com, Tim Hawkins <tim.hawkins@...> wrote:
>
> Try it from two seperate machines, you may be experiencing a locking
> issue on your sessions, if you have two browser windows open on the
> same server on the same machine, they have the same PHPSESSION id,
> when you use files or memcache sessions the session is locked for the
> duration of the page execution, which means that if you hit the same
> site from two browser windows one will not load until the other page
> completes sending its data.
>
> On 3 Sep 2009, at 21:41, zotium wrote:
>
> > I'm currently working on http://thedailyreviewer.com and everything
> > was great with SimplePie until recently when the traffic started
> > coming in, the app is experiencing "bottleneck" issues. Upon
> > investigation, it seems that SimplePie is fetching feeds one by one,
> > even if I hit several pages simultaneously (which would mean several
> > instances of the script running) , a page would only load after the
> > previous one loads.
> >
> > Does anybody know how to work around this limitation?
> >
> > Cheers!
> >
> > Rick Ong
> > Azure Web Design
> > Mobile: +63-928-5542750
> > YM: zotium
> > Skype: zotium1
> >
> >
> >
>
Upon installation of SimplePie version 1.2, I am getting a data could not be
converted to UTF-8 error.
I uploaded the sp_compatibility_test.php file to my web server.
It passes the compatibility test.
I have done a search on the SimplePie web site and Google, but having found a
cause.
Is it possible I need PHP 5 on my server for SimplePie version 1.2?
I have the line of code $feed->handle_content_type(); in the php
The following is some of the code
// This makes sure that the content is sent to the browser as text/html and the
UTF-8 character set (since we didn't change it).
$feed->handle_content_type();
// Let's begin our XHTML webpage code. The DOCTYPE is supposed to be the very
first thing, so we'll keep it on the same line as the closing-PHP tag.
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Sample SimplePie Page</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
I think its all about PHP, Not SimplePie.
--
A K M Mokaddim
http://talk.cmyweb.nethttp://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক à¦à¦¾à¦²
Sent from Dhaka, Bangladesh
I have this RSS parsing code and it paginates , but only uses next and previous
links instead of how google does it. I want it to read like this: first 1 2
3.... last
<?php
require_once('php/simplepie.inc');
// Set your own configuration options as you see fit.
$feed = new SimplePie();
$feed->set_feed_url(array(
'http://feeds2.feedburner.com/MishsGlobalEconomicTrendAnalysis',
'http://feeds.feedburner.com/TheBigPicture',
'http://feeds2.feedburner.com/ChartsAndCoffee',
'http://feeds.feedburner.com/typepad/tradeblogs/the_slope_of_hope_with_ti',
));
$success = $feed->init();
// Make sure the page is being served with the right headers.
$feed->handle_content_type();
// Set our paging values
$start = (isset($_GET['start']) && !empty($_GET['start'])) ? $_GET['start'] : 0;
// Where do we start?
$length = (isset($_GET['length']) && !empty($_GET['length'])) ? $_GET['length']
: 5; // How many per page?
$max = $feed->get_item_quantity(); // Where do we end?
// When we end our PHP block, we want to make sure our DOCTYPE is on the top
line to make
// sure that the browser snaps into Standards Mode.
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title>SimplePie: Demo</title>
<link rel="stylesheet" href="styles.css" type="text/css" media="screen,
projector" />
</head>
<body>
<div id="site">
<?php
// If we have an error, display it.
if ($feed->error())
{
echo '<div class="sp_errors">' . "\r\n";
echo '<p>' . htmlspecialchars($feed->error()) . "</p>\r\n";
echo '</div>' . "\r\n";
}
?>
<?php if ($success): ?>
<?php
// get_items() will accept values from above.
foreach($feed->get_items($start, $length) as $item):
$feed = $item->get_feed();
?>
<div class="chunk">
<h4><?php if ($item->get_permalink()) echo '<a href="' .
$item->get_permalink() . '">'; echo $item->get_title(true); if
($item->get_permalink()) echo '</a>'; ?></h4>
<p class="footnote">Source: <a href="<?php echo $feed->get_permalink();
?>"><?php echo $feed->get_title(); ?></a> | <?putenv("TZ=US/Pacific"); echo
$item->get_date('j M Y | g:i a'); ?></p>
</div>
<?php endforeach; ?>
<?php endif; ?>
<?php
// Let's do our paging controls
$next = (int) $start + (int) $length;
$prev = (int) $start - (int) $length;
// Create the NEXT link
$nextlink = '<a href="?start=' . $next . '&length=' . $length . '">Next
»</a>';
if ($next > $max)
{
$nextlink = 'Next »';
}
// Create the PREVIOUS link
$prevlink = '<a href="?start=' . $prev . '&length=' . $length . '">«
Previous</a>';
if ($prev < 0 && (int) $start > 0)
{
$prevlink = '<a href="?start=0&length=' . $length . '">« Previous</a>';
}
else if ($prev < 0)
{
$prevlink = '« Previous';
}
// Normalize the numbering for humans
$begin = (int) $start + 1;
$end = ($next > $max) ? $max : $next;
?>
<p>Showing <?php echo $begin; ?>–<?php echo $end; ?> out of <?php echo
$max; ?> | <?php echo $prevlink; ?> | <?php echo $nextlink; ?> | <a href="<?php
echo '?start=' . $start . '&length=5'; ?>">5</a>, <a href="<?php echo '?start='
. $start . '&length=10'; ?>">10</a>, or <a href="<?php echo '?start=' . $start .
'&length=20'; ?>">20</a> at a time.</p>
</div>
</body>
</html>
Is there a better way to receive just the "content" in the HTML formatted <description> tag from Google Reader into SimplePie and then display it on my news page?
Thank you so much for taking the time to help me with this.
Shawn
From: shiplu
<shiplu.net@...> To: simplepie-support@yahoogroups.com Sent: Thu, November 12, 2009 1:44:24 PM Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
On Thu, Nov 12, 2009 at 9:54 AM, Shawn <cthonian130@ yahoo.com> wrote:
>
>
> I tried passing some parameters through the URL to receive an output XML format, however, I received a "permission" denied" error from Google. I tried using different URL aliasing from Google Reader with no luck. Since it is returned as HTML I wanted to use json_decode to take that output from this URL, which is the same as the one below but a different alias.
If you are getting HTML response, you can not apply json_decode( )
function. The response must be a valid json string.
Beside this, If the response is json, you can not use simplepie. You
can use simple curl_* functions to fetch json object.
> http://www.google. com/reader/ public/javascrip t/user/userID/ state/com. google/broadcast ?n=10
>
> using json_decode on this feed URL converts the javascript variables to XML tags which I can target in SP. Though, I am unsure how to use the json_decode function with SimplePie.
>
> Shawn
>
> ____________ _________ _________ __
> From: shiplu <shiplu.net@gmail. com>
> To: simplepie-support@ yahoogroups. com
> Sent: Wed, November 11, 2009 4:25:59 PM
> Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
>
>
>
> On Wed, Nov 11, 2009 at 4:12 PM, Shawn <cthonian130@ yahoo.com> wrote:
> > When I set the feed URL in SimplePie for my Google Reader shared items and then use <?php echo $item->get_descript ion(); ?>, it returns a formatted HTML block of the title, link, source, and summary.
>
> The content from google is html. not feed. See the content-type below.
>
> $ curl http://www.google. com/reader/ shared/036087826 08274080367 -i
> HTTP/1.1 200 OK
> Content-Type: text/html; charset=UTF- 8
> Cache-Control: no-cache, no-store, max-age=0, must-revalidate
> Pragma: no-cache
> Expires: Fri, 01 Jan 1990 00:00:00 GMT
> Date: Wed, 11 Nov 2009 21:24:20 GMT
> X-Content-Type- Options: nosniff
> X-XSS-Protection: 0
> Server: GFE/2.0
> Transfer-Encoding: chunked
>
> Are you sure you are not missing any part of the url?
>
> --
> A K M Mokaddim
> http://talk. cmyweb.net
> http://twitter. com/shiplu
> Stop Top Posting !!
> বাংলিশ লেখার চাইতে বাংলা লেখা অনেক à¦à¦¾à¦²
> Sent from Dhaka, Bangladesh
>
>
>
>
Hi,
I am trying to use SimplePie with CodeIgniter. I am developing on a local xampp
installation. I can run the demo application OK except for some warning
messages to do with idn/idna_convert.class.php.
I have copied and renamed the SimplePie.inc to Simplepie.php in the library
folder. I have created a controller and added this line to the function index:
$this->load->library('Simplepie');
When I load Apache crashes and I have the following in my log file:
Parent: child process exited with status 3221225477 -- Restarting.
I am new to using PHP, CodeIgniter and SimplePie so I am hoping it's just
something simple I am missing.
Any help is much appreciated!
Debi
Hi everyone,
I'm sure this is just too simple but I have to ask.
Simple Pie won't recognize my rss feed
http://www.icerocket.com/search?tab=twitter&q=eltjobs+university&rss=1
that I made with Icerocket search for my twitter. Is there any way to get it to
recognize and parse this feed?
all I get is this message.
A feed could not be found at http://www.icerocket.com/search?tab=twitter
Thanks a bunch in advance. I'm just amazed and really love using simple pie! but
need to process this kind of feed.
David
--- In simplepie-support@yahoogroups.com, "bloggerruggles" <Steve@...> wrote: > > Multiple feeds are working OK, but I'm really looking for something > that moves on the page - a ticker that scrolls, rolls or fades - a > bit of pizzaz. Problem is, all the great (and less-than-great) ticker > feeds I've found are expecting input from a trivial interface, like a > text file or something hardcoded into a JS file...neither appropriate > for the SimplePie feed. > > Are there any good ticker scripts that work with SP? > > Thanks for the help... >
On Thu, Nov 12, 2009 at 9:54 AM, Shawn <cthonian130@...> wrote:
>
>
> I tried passing some parameters through the URL to receive an output XML
format, however, I received a "permission" denied" error from Google. I tried
using different URL aliasing from Google Reader with no luck. Since it is
returned as HTML I wanted to use json_decode to take that output from this URL,
which is the same as the one below but a different alias.
If you are getting HTML response, you can not apply json_decode()
function. The response must be a valid json string.
Beside this, If the response is json, you can not use simplepie. You
can use simple curl_* functions to fetch json object.
>
http://www.google.com/reader/public/javascript/user/userID/state/com.google/broa\
dcast?n=10
>
> using json_decode on this feed URL converts the javascript variables to XML
tags which I can target in SP. Though, I am unsure how to use the json_decode
function with SimplePie.
>
> Shawn
>
> ________________________________
> From: shiplu <shiplu.net@...>
> To: simplepie-support@yahoogroups.com
> Sent: Wed, November 11, 2009 4:25:59 PM
> Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple
Pie
>
>
>
> On Wed, Nov 11, 2009 at 4:12 PM, Shawn <cthonian130@ yahoo.com> wrote:
> > When I set the feed URL in SimplePie for my Google Reader shared items and
then use <?php echo $item->get_descript ion(); ?>, it returns a formatted HTML
block of the title, link, source, and summary.
>
> The content from google is html. not feed. See the content-type below.
>
> $ curl http://www.google. com/reader/ shared/036087826 08274080367 -i
> HTTP/1.1 200 OK
> Content-Type: text/html; charset=UTF- 8
> Cache-Control: no-cache, no-store, max-age=0, must-revalidate
> Pragma: no-cache
> Expires: Fri, 01 Jan 1990 00:00:00 GMT
> Date: Wed, 11 Nov 2009 21:24:20 GMT
> X-Content-Type- Options: nosniff
> X-XSS-Protection: 0
> Server: GFE/2.0
> Transfer-Encoding: chunked
>
> Are you sure you are not missing any part of the url?
>
> --
> A K M Mokaddim
> http://talk. cmyweb.net
> http://twitter. com/shiplu
> Stop Top Posting !!
> বাংলিশ লেখার চাইতে বাংলা
লেখা অনেক à¦à¦¾à¦²
> Sent from Dhaka, Bangladesh
>
>
>
>
--
A K M Mokaddim
http://talk.cmyweb.nethttp://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক à¦à¦¾à¦²
I tried passing some parameters through the URL to receive an output XML format, however, I received a "permission" denied" error from Google. I tried using different URL aliasing from Google Reader with no luck. Since it is returned as HTML I wanted to use json_decode to take that output from this URL, which is the same as the one below but a different alias.
using json_decode on this feed URL converts the javascript variables to XML tags which I can target in SP. Though, I am unsure how to use the
json_decode function with SimplePie.
Shawn
From: shiplu <shiplu.net@...> To: simplepie-support@yahoogroups.com Sent: Wed, November 11, 2009 4:25:59 PM Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
On Wed, Nov 11, 2009 at 4:12 PM, Shawn <cthonian130@ yahoo.com> wrote:
> When I set the feed URL in SimplePie for my Google Reader shared items and then use <?php echo $item->get_descript ion(); ?>, it returns a formatted HTML block of the title, link, source, and summary.
The content from google is html. not feed. See the content-type below.
Are you sure you are not missing any part of the url?
--
A K M Mokaddim http://talk. cmyweb.net http://twitter. com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা অনেক à¦à¦¾à¦²
Sent from Dhaka, Bangladesh
On Wed, Nov 11, 2009 at 4:12 PM, Shawn <cthonian130@...> wrote:
> When I set the feed URL in SimplePie for my Google Reader shared items and
then use <?php echo $item->get_description(); ?>, it returns a formatted HTML
block of the title, link, source, and summary.
The content from google is html. not feed. See the content-type below.
$ curl http://www.google.com/reader/shared/03608782608274080367 -i
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Wed, 11 Nov 2009 21:24:20 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Server: GFE/2.0
Transfer-Encoding: chunked
Are you sure you are not missing any part of the url?
--
A K M Mokaddim
http://talk.cmyweb.nethttp://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক à¦à¦¾à¦²
Sent from Dhaka, Bangladesh
When I set the feed URL in SimplePie for my Google Reader shared items and then
use <?php echo $item->get_description(); ?>, it returns a formatted HTML block
of the title, link, source, and summary.
All I want to receive is the summary text but there is now way to break it of
the HTML block.
Can I use the json_decode to format the incoming feed format from Google Reader
to create and object I can then use PHP to reference.
Here is my code as it is now:
<?php
require 'http://www.inboundlogistics.com/php/simplepie.inc';
$url = 'http://www.google.com/reader/shared/03608782608274080367';
$cache_duration = '1';
$feed = new SimplePie();
$feed->set_feed_url($url);
$feed->set_cache_duration($cache_duration);
$feed->init();?>
---------------------
<?php
// loop through items
foreach ($feed->get_items(0, 5) as $item):
?>
<li class="feed"><a class="feed" href="<?php echo substr($item->get_permalink(
), 54, -43); ?>" target="_blank"><?php echo $item->get_title(); ?></a></li>
<?php endforeach; ?>
I was looking here as a potential solution:
http://php.net/manual/en/book.json.php
but does this mean I have to install it and then once installed how does it work
with SimplePie?
Shawn
I can display multiple feeds when I use
<a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title();
?></a>
but when I use get source
<?php if ($source = $item->get_source()) echo '<a href="' .
$source->get_permalink() . '"target="_blank">'; echo $source->get_title(); echo
'</a>'; ?>
Nada.
In this case the feeds are all from Google so are exactly the
same apart from their url
Any suggestions?
Much Appreciated.
Hello,
I am getting
Call to undefined function idn_to_utf8() in
/var/www/vhosts/..../libraries/SimplePie.php on line 7538
How to resolve this error?
Thanks in advance.
Shiplu
http://talk.cmyweb.nethttp://twitter.com/shiplu