Skip to content

Instantly share code, notes, and snippets.

@rmccue
Created December 3, 2009 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmccue/248095 to your computer and use it in GitHub Desktop.
Save rmccue/248095 to your computer and use it in GitHub Desktop.
A quick demo of how to get comments for a Blogger post with SimplePie.
<?php
$sp = new SimplePie('http://example.com', './cache');
foreach($sp->get_items() as $item) {
echo '<h2>' . $item->get_title() . '</h2>';
$link = $item->get_link(0, 'replies');
if($link) {
$comments = new SimplePie($link);
foreach($comments->get_posts() as $comment) {
echo 'Comment: ' . $comment->get_content();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment