문제

Blog의 RSS 피드가있어 Magpie RSS 파서를 사용하여 다른 웹 사이트에 표시하려고합니다.'링크'와 '제목'태그를 올바르게 가져 오지만 블로그의 게시물의 내용을 가져 오지 않습니다.과거에는 일을 할 수 있지만 콘텐츠가 태그에 동봉되었습니다.이 경우 내용은 다음과 같이 나타납니다.

XML :

<content type="html">Test post&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/886334333339671757-1360251841923051040?l=grippofunkband.blogspot.com' alt='' /&gt;&lt;/div&gt;</content>
.

php

require_once 'rss/rss_fetch.inc';

$url = 'http://feeds.feedburner.com/grippofunkband?format=xml';
//http://grippofunkband.blogspot.com/feeds/posts/default';
$rss = fetch_rss($url);

$i = 0;
$max = 4;
foreach ($rss->items as $item ) {
    $title = $item['title'];
    $content = $item['content'];        
    $url = $item['link'];
    $pubDate = $item['updated'];
    echo "<li>$title<br />$url<br />$content</li>";//<a href='$url'></a>
    if (++$i == $max) break;                        
}
.

누구든지 목차 태그에 무엇이 있는지,이 문제를 해결할 수있는 방법이있는 경우 왜 그렇게하는지 생각할 수 있습니까?어떤 도움이 될 것입니다!

도움이 되었습니까?

해결책

That's not an RSS feed. It's an Atom feed, which I think is probably your basic problem. From memory, try grabbing atom_content instead of content, but it may depend on the exact version of Magpie you're using.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top