aboutsummaryrefslogtreecommitdiffstats
path: root/simplepie/demo/cli_test.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-05 03:34:42 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-05 03:34:42 -0700
commit9f7ae0e95f89b964a098eaacdfd89ff25e05c615 (patch)
tree0bfe8d04f4b11abdbea41fe9bf6e165eec8ebc4b /simplepie/demo/cli_test.php
parentf5826105bfc514599b2c5b6692bca14ca4bc5d78 (diff)
downloadvolse-hubzilla-9f7ae0e95f89b964a098eaacdfd89ff25e05c615.tar.gz
volse-hubzilla-9f7ae0e95f89b964a098eaacdfd89ff25e05c615.tar.bz2
volse-hubzilla-9f7ae0e95f89b964a098eaacdfd89ff25e05c615.zip
Add simplepie
Diffstat (limited to 'simplepie/demo/cli_test.php')
-rwxr-xr-xsimplepie/demo/cli_test.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/simplepie/demo/cli_test.php b/simplepie/demo/cli_test.php
new file mode 100755
index 000000000..ec933c5ad
--- /dev/null
+++ b/simplepie/demo/cli_test.php
@@ -0,0 +1,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());
+
+?> \ No newline at end of file