メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

RSS::fetch

Fetch the next entry of RSS feed

Description​

public mixed RSS::fetch()

Returns the next entry as an array (see Entry data), or false when there are no more entries.

Example​

Controller
use Fegg\Tool\RSS;

$rss = new RSS('https://example.com/feed');

while ($post = $rss->fetch()) {
// $post['title'], $post['link'], $post['datetime'] ...
}