aboutsummaryrefslogtreecommitdiffstats
path: root/simplepie/demo/cli_test.php
blob: ec933c5ad787be4019e021687e162530cf23476b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/php
<?php
include_once('../simplepie.inc');

// Parse it
$feed = new SimplePie();
if (isset($argv[1]) && $argv[1] !== '')
{
	$feed->set_feed_url($argv[1]);
	$feed->enable_cache(false);
	$feed->init();
}

$items = $feed->get_items();

foreach ($items as $item)
{
	echo $item->get_title() . "\n";
}

var_dump($feed->get_item_quantity());

?>