1
PHP에서 사용할 수있는 스크립트 나 클래스가 있습니까? 다른 RSS 피드를 정의하여 날짜별로 정렬 된 페이지에 출력 할 수 있습니까?PHP 다중 피드 rss 파서?
여러 소스에서 파싱 된 RSS 피드가 함께 묶이지 만 날짜별로 정렬 된 페이지를 원합니다.
PHP에서 사용할 수있는 스크립트 나 클래스가 있습니까? 다른 RSS 피드를 정의하여 날짜별로 정렬 된 페이지에 출력 할 수 있습니까?PHP 다중 피드 rss 파서?
여러 소스에서 파싱 된 RSS 피드가 함께 묶이지 만 날짜별로 정렬 된 페이지를 원합니다.
이 작업을 수행 할 수있는 스크립트는 SimplePie입니다. Sort multiple feeds by time and date을 참조하십시오.
// Create a new SimplePie object
$feed = new SimplePie();
// Instead of only passing in one feed url, we'll pass in an array of three
$feed->set_feed_url(array(
'http://digg.com/rss/index.xml',
'http://feeds.tuaw.com/weblogsinc/tuaw',
'http://feeds.uneasysilence.com/uneasysilence/blog'
));
// Initialize the feed object
$feed->init();
// This will work if all of the feeds accept the same settings.
$feed->handle_content_type();
foreach ($feed->get_items() as $item) {
$item->get_title(), "\n";
}
우수, 정확히 내가 필요한 것, 감사합니다! – NaughtySquid