|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/share/doc/cpanel-php54-Horde-Feed-2.0.1/examples/ |
Upload File : |
#!@php_bin@
<?php
/**
* @package Feed
*/
/* Get a Horde framework include_path set up. */
require 'Horde/Autoloader.php';
$p = new Horde_Argv_Parser(array(
'usage' => "%prog feed_url\n\nExample:\n%prog http://graphics8.nytimes.com/services/xml/rss/nyt/HomePage.xml",
));
list($values, $args) = $p->parseArgs();
if (count($args) != 1) {
$p->printHelp();
exit(1);
}
$feed = Horde_Feed::readUri($args[0]);
echo count($feed) . " entries:\n\n";
foreach ($feed as $i => $entry) {
echo ($i + 1) . '. ' . $entry->title() . "\n";
}
exit(0);