SimplePie PHP Cross Reference Developer Tools

Source: /demo/cli_test.php - 23 lines - 351 bytes - Summary - Text - Print

   1  #!/usr/bin/php
   2  <?php
   3  include_once ('../autoloader.php');
   4  
   5  // Parse it
   6  $feed = new SimplePie();
   7  if (isset($argv[1]) && $argv[1] !== '')
   8  {
   9      $feed->set_feed_url($argv[1]);
  10      $feed->enable_cache(false);
  11      $feed->init();
  12  }
  13  
  14  $items = $feed->get_items();
  15  
  16  foreach ($items as $item)
  17  {
  18      echo $item->get_title() . "\n";
  19  }
  20  
  21  var_dump($feed->get_item_quantity());
  22  
  23  ?>

title

Description

title

Description

title

Description

title

title

Body