我使用SimplePie在我的页面上显示RSS Feed。现在我想显示评论的数量。
RSS:
<slash:comments>0</slash:comments>我如何用Simplepie来展示这一点呢?
发布于 2011-03-21 16:24:31
您希望使用$item->get_item_tags()来完成此操作。根据猜测,您可能需要带有comments标记的http://purl.org/rss/1.0/modules/slash/名称空间。
$comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');然后,您可以查看此数据结构,以确定所需的内容。在猜测中...
$number = $comments[0]['data'];https://stackoverflow.com/questions/5341811
复制相似问题