getting rss entries with php
Posted: Mon Jul 13, 2009 10:53 am
Hi,
I’m using PHP to get blog entries from a newspaper blog RSS (that I know uses typepad). Everything is working: I can download, parse and print out the 10 first rss entries of the blog: http://blogs.elpais.com/juan_cruz/rss.xml
$ch = curl_init("http://www.typepad.com/t/atom/weblog/blog_id=1267100");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data1 = curl_exec($ch);
curl_close($ch);
However, I need to download more than 10 entries… In fact, I need all entries from 2009. And here is where I am running crazy: that rss.xml file only contains 10 entries, and I cannot find a way to download the following entries.
I’ve been searching a solution for two days already, and I’ve found many places where they explain how to limit the number of RSS entries retrieved. But I can’t find a way to retrieve those extra entries that do not appear in the RSS xml.
I know this can be done, because if I subscribe to that blog in Google Reader and then scroll to the bottom of the entry list, Google Reader will automatically retrieve more entries and show them to me.
Therefore, Google Reader is somehow finding out how to retrieve the next entries...
I hope you can help me…
Thank you for your time,
Ramon
I’m using PHP to get blog entries from a newspaper blog RSS (that I know uses typepad). Everything is working: I can download, parse and print out the 10 first rss entries of the blog: http://blogs.elpais.com/juan_cruz/rss.xml
$ch = curl_init("http://www.typepad.com/t/atom/weblog/blog_id=1267100");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data1 = curl_exec($ch);
curl_close($ch);
However, I need to download more than 10 entries… In fact, I need all entries from 2009. And here is where I am running crazy: that rss.xml file only contains 10 entries, and I cannot find a way to download the following entries.
I’ve been searching a solution for two days already, and I’ve found many places where they explain how to limit the number of RSS entries retrieved. But I can’t find a way to retrieve those extra entries that do not appear in the RSS xml.
I know this can be done, because if I subscribe to that blog in Google Reader and then scroll to the bottom of the entry list, Google Reader will automatically retrieve more entries and show them to me.
Therefore, Google Reader is somehow finding out how to retrieve the next entries...
I hope you can help me…
Thank you for your time,
Ramon