メインコンテンツまでスキップ
Version: Fegg 5.x

RSS::fetch

フィードの次のエントリーを取得します

説明​

public mixed RSS::fetch()

次のエントリーを配列で返します(エントリーのデータを参照)。エントリーが残っていなければfalseを返します。

例​

Controller
use Fegg\Tool\RSS;

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

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