Search the web
Sign In
New User? Sign Up
simplepie-support · SimplePie Support
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 4578 - 4609 of 4653   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#4609 From: "mike86cz" <mike86cz@...>
Date: Sat Nov 28, 2009 12:59 pm
Subject: How to get a video code from content of a feed
mike86cz
Offline Offline
Send Email Send Email
 
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.

#4608 From: "tgif_at" <jatin_matah@...>
Date: Fri Nov 27, 2009 6:13 am
Subject: A feed could not be found at ....
tgif_at
Offline Offline
Send Email Send Email
 
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.

#4606 From: "mafoo_white" <mafoo_white@...>
Date: Thu Nov 26, 2009 3:48 pm
Subject: Data being lost
mafoo_white
Online Now Online Now
Send Email Send Email
 
Something weird is happening causing some of the links inside the rss feed when
it gets parsed. The links get changed.

http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplicat\
ions/sf=143441/limit=10/xml?partnerId=30&LS_PARAM=http%3A%2F%2Fclick.linksynergy\
.com%2Ffs-bin%2Fstat%3Fid%3D43r72hG3eK0%26offerid%3D146261%26type%3D3%26subid%3D\
0%26tmpid%3D1826%26RD_PARM1%3D

Paste it into http://simplepie.org/demo/ for what i mean.

You can use curl to get the raw xml to compare.

Do i need to tell simplepie to escape certain characters before i parse the
feed?

Anyone have an idea whats going wrong?

Thanks in advanced.

#4605 From: "diamantsus" <diamantsus@...>
Date: Wed Nov 25, 2009 9:38 pm
Subject: Cannot merge zero SimplePie objects
diamantsus
Offline Offline
Send Email Send Email
 
I'm not able to merge this feed:
http://feeds.feedburner.com/Geekissimo
http://feeds.feedburner.com/MambroRss
i receive a error:
Warning: Cannot merge zero SimplePie objects
How to do?

#4604 From: "cybler" <david.barkman13@...>
Date: Wed Nov 25, 2009 4:22 am
Subject: Re: [SimplePie] Polite Cache'ing
cybler
Offline Offline
Send Email Send Email
 
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.
> >
> >
>

#4603 From: "srg_rector" <srg_rector@...>
Date: Wed Nov 25, 2009 2:43 am
Subject: help with rssmerger.php
srg_rector
Offline Offline
Send Email Send Email
 
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>

#4602 From: Tim Hawkins <tim.hawkins@...>
Date: Tue Nov 24, 2009 10:52 pm
Subject: Re: [SimplePie] Polite Cache'ing
tim_hawkins4
Offline Offline
Send Email Send Email
 
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.



#4601 From: "cybler" <david.barkman13@...>
Date: Tue Nov 24, 2009 7:59 pm
Subject: Polite Cache'ing
cybler
Offline Offline
Send Email Send Email
 
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.

#4600 From: "Porsche" <porscheheritage@...>
Date: Sat Nov 21, 2009 10:06 pm
Subject: Re: Newsblock Demo Script (Images?)
porscheheritage
Offline Offline
Send Email Send Email
 
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?
>

#4599 From: Peoplecome Fvgerf <fpeoplecome@...>
Date: Sat Nov 21, 2009 5:26 pm
Subject: Re: [SimplePie] Newsblock Demo Script (Images?)
fpeoplecome
Offline Offline
Send Email Send Email
 
should be in the 'content' part of the php files. If the feed has no pictures you wont get any.


From: Porsche <porscheheritage@...>
To: simplepie-support@yahoogroups.com
Sent: Sat, November 21, 2009 12:14:40 AM
Subject: [SimplePie] Newsblock Demo Script (Images?)

 

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?



#4598 From: "Porsche" <porscheheritage@...>
Date: Sat Nov 21, 2009 8:14 am
Subject: Newsblock Demo Script (Images?)
porscheheritage
Offline Offline
Send Email Send Email
 
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?

#4597 From: "Peoplecome" <fpeoplecome@...>
Date: Fri Nov 20, 2009 11:21 pm
Subject: Multi URL ajax feed in one box
fpeoplecome
Offline Offline
Send Email Send Email
 
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");

#4596 From: Ryan Parman <simplepie.support@...>
Date: Fri Nov 20, 2009 5:36 pm
Subject: Re: [SimplePie] version 1.2 install 'The data could not be converted to UTF-8' error
skyzyxufks
Offline Offline
Send Email Send Email
 
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
>
>
>

#4595 From: "vipmilton" <vipmilton@...>
Date: Fri Nov 20, 2009 5:06 pm
Subject: version 1.2 install 'The data could not be converted to UTF-8' error
vipmilton
Offline Offline
Send Email Send Email
 
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.

#4593 From: shiplu <shiplu.net@...>
Date: Thu Nov 19, 2009 4:06 pm
Subject: Re: [SimplePie] Experiencing bottleneck
staticint
Offline Offline
Send Email Send Email
 
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.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক ভাল

#4592 From: "thornj1" <jeff.thorn@...>
Date: Thu Nov 19, 2009 3:13 pm
Subject: Re: [SimplePie] Experiencing bottleneck
thornj1
Offline Offline
Send Email Send Email
 
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
> >
> >
> >
>

#4591 From: "vipmilton" <vipmilton@...>
Date: Tue Nov 17, 2009 6:07 pm
Subject: SimplePie version 1.2 installation data could not be converted to UTF-8 error
vipmilton
Offline Offline
Send Email Send Email
 
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" />

#4590 From: shiplu <shiplu.net@...>
Date: Sun Nov 15, 2009 11:26 pm
Subject: Re: [SimplePie] Convert this simplepie code into a google like pagination
staticint
Offline Offline
Send Email Send Email
 
I think its all about PHP, Not SimplePie.

--
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক ভাল
Sent from Dhaka, Bangladesh

#4589 From: "Peoplecome" <fpeoplecome@...>
Date: Sun Nov 15, 2009 11:21 pm
Subject: Convert this simplepie code into a google like pagination
fpeoplecome
Offline Offline
Send Email Send Email
 
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
&raquo;</a>';
	 if ($next > $max)
	 {
		 $nextlink = 'Next &raquo;';
	 }




	 // Create the PREVIOUS link
	 $prevlink = '<a href="?start=' . $prev . '&length=' . $length . '">&laquo;
Previous</a>';
	 if ($prev < 0 && (int) $start > 0)
	 {
		 $prevlink = '<a href="?start=0&length=' . $length . '">&laquo; Previous</a>';
	 }
	 else if ($prev < 0)
	 {
		 $prevlink = '&laquo; Previous';
	 }

	 // Normalize the numbering for humans
	 $begin = (int) $start + 1;
	 $end = ($next > $max) ? $max : $next;
	 ?>

	 <p>Showing <?php echo $begin; ?>&ndash;<?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>

#4588 From: "Peoplecome" <fpeoplecome@...>
Date: Sun Nov 15, 2009 11:20 pm
Subject: Convert this simplepie code into a google like pagination
fpeoplecome
Offline Offline
Send Email Send Email
 
How would you convert this simple pie pagination code into one that resembles
google? Something like: Prev 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
&raquo;</a>';
	 if ($next > $max)
	 {
		 $nextlink = 'Next &raquo;';
	 }




	 // Create the PREVIOUS link
	 $prevlink = '<a href="?start=' . $prev . '&length=' . $length . '">&laquo;
Previous</a>';
	 if ($prev < 0 && (int) $start > 0)
	 {
		 $prevlink = '<a href="?start=0&length=' . $length . '">&laquo; Previous</a>';
	 }
	 else if ($prev < 0)
	 {
		 $prevlink = '&laquo; Previous';
	 }

	 // Normalize the numbering for humans
	 $begin = (int) $start + 1;
	 $end = ($next > $max) ? $max : $next;
	 ?>

	 <p>Showing <?php echo $begin; ?>&ndash;<?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>

#4587 From: Shawn <cthonian130@...>
Date: Fri Nov 13, 2009 3:06 pm
Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
cthonian130
Offline Offline
Send Email Send Email
 
Ok, I think I know what I have to do but I am unsure how to do it. You are right that this shared URL: http://www.google.com/reader/shared/userID, from Google Reader outputs as formatted HTML and I can't use JSON. However, this URL: http://www.google.com/reader/public/javascript/user/userID/state/com.google/broadcast?n=10, outputs javascript but I can't use it in Simple Pie.

Solution: Take this URL: http://www.google.com/reader/public/javascript/user/userID/state/com.google/broadcast?n=10, use jeson_decode to format it into XML tags and then pass it in to Simple Pie. I have no idea how to do that!

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
>
>
>
>

--
A K M Mokaddim
http://talk. cmyweb.net
http://twitter. com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা অনেক ভাল



#4586 From: "debireese" <dreese@...>
Date: Fri Nov 13, 2009 7:19 am
Subject: Apache crashes with SimplePie
debireese
Offline Offline
Send Email Send Email
 
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

#4585 From: "ddeubel2000" <ddeubel2000@...>
Date: Fri Nov 13, 2009 6:25 am
Subject: Simple Pie doesn't recognize "&" in rss feed
ddeubel2000
Offline Offline
Send Email Send Email
 
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

#4584 From: "Marshall" <marshall_im@...>
Date: Fri Nov 13, 2009 2:09 am
Subject: Re: 'snazzy ticker' | Feed item rotator / randomizer with fade effect
marshall_im
Offline Offline
Send Email Send Email
 
Here is a method for creating a (random) news ticker that 'fades'.

Refer to "Simple Way to Random Display or Rotate Content Using JavaScript and CSS".

In the first section of the article, the script's author explains how 'randomly displayed content' is to be placed 'into [an] unordered list'.

By modifying the way SimplePie displays a feed, resulting items can be output to an unordered list (vs. paragraph line items).  This is key.

For example:

<div id="ticker">

<?php if ($success): ?>
<? $itemlimit=0; ?>

<ul id="tips">
<?php foreach($feed->get_items() as $item): ?>
<? if ($itemlimit==32) { break; } ?>

<li>
<a href="<? echo $item->get_permalink(); ?>">
<? echo $item->get_title(); ?>
</a>
</li>

<? $itemlimit++ ?>
<?php endforeach; ?>
</ul>

<?php endif; ?>

</div>

You can also style the containing div to prevent content directly below the ticker from shifting up and down on the page:

<style type="text/css">

#ticker {
height:100px;
}

</style>

Here is a related script:

"Easy Slider 1.7 - Numeric Navigation jQuery Slider" 



--- 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...
>

#4583 From: shiplu <shiplu.net@...>
Date: Thu Nov 12, 2009 6:44 pm
Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
staticint
Offline Offline
Send Email Send Email
 
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.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক ভাল

#4582 From: Shawn <cthonian130@...>
Date: Thu Nov 12, 2009 2:54 pm
Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
cthonian130
Offline Offline
Send Email Send Email
 
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.

http://www.google.com/reader/public/javascript/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@...>
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



#4581 From: shiplu <shiplu.net@...>
Date: Wed Nov 11, 2009 9:25 pm
Subject: Re: [SimplePie] using json_decode for Google Reader feeds in Simple Pie
staticint
Offline Offline
Send Email Send Email
 
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.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা
অনেক ভাল
Sent from Dhaka, Bangladesh

#4580 From: "Shawn" <cthonian130@...>
Date: Wed Nov 11, 2009 9:12 pm
Subject: using json_decode for Google Reader feeds in Simple Pie
cthonian130
Offline Offline
Send Email Send Email
 
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

#4579 From: "johnhumphrey111" <john@...>
Date: Wed Nov 11, 2009 8:28 pm
Subject: Multifeeds with Get Source Issue
johnhumphrey111
Offline Offline
Send Email Send Email
 
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.

#4578 From: "staticint" <shiplu.net@...>
Date: Sat Nov 7, 2009 8:46 pm
Subject: Call to undefined function idn_to_utf8()
staticint
Offline Offline
Send Email Send Email
 
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.net
http://twitter.com/shiplu

Messages 4578 - 4609 of 4653   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help