Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<?php $download=json_decode(wp_remote_retrieve_body(wp_remote_get('http://www.reddit.com/r/Wordpress/comments/1a23de/reddit_comments/.json')));
foreach ($download as $comments){
?><ul><?php
foreach ($comments->data->children as $comment){
if($comment->data->body != null){
?><li><a href="http://www.reddit.com/user/<?php echo($comment->data->author)?>" target="_blank">
<?php echo html_entity_decode($comment->data->author); ?></a><br /><?php
echo html_entity_decode($comment->data->body); ?></li><br /><br /><ul><?php
foreach($comment->data->replies->data->children as $reply){
?><li><a href="http://www.reddit.com/user/<?php echo($reply->data->author)?>" target="_blank">
<?php echo html_entity_decode($reply->data->author); ?></a><br /><?php
echo html_entity_decode($reply->data->body_html); ?></li><br /><?php
} ?></ul><?php
}
} ?></ul><?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.