3 function microtime_float()
5 if (version_compare(phpversion(), '5.0.0', '>='))
7 return microtime(true);
11 list($usec, $sec) = explode(' ', microtime());
12 return ((float) $usec + (float) $sec);
16 $start = microtime_float();
18 include('../simplepie.inc');
21 $feed = new SimplePie();
22 if (!empty($_GET['feed']))
24 if (get_magic_quotes_gpc())
26 $_GET['feed'] = stripslashes($_GET['feed']);
28 $feed->set_feed_url($_GET['feed']);
31 $feed->handle_content_type();
33 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
35 <html xmlns="http://www.w3.org/1999/xhtml">
37 <title><?php echo (empty($_GET['feed'])) ? 'SimplePie' : 'SimplePie: ' . $feed->get_title(); ?></title>
39 <!-- META HTTP-EQUIV -->
40 <meta http-equiv="content-type" content="text/html; charset=<?php echo ($feed->get_encoding()) ? $feed->get_encoding() : 'UTF-8'; ?>" />
41 <meta http-equiv="imagetoolbar" content="false" />
43 <style type="text/css">
51 background-color:#333;
70 text-decoration:underline;
74 background-color:#f3f3ff;
79 background-color:#f3f3ff;
81 border:1px dotted #000080;
91 border-bottom:1px solid #ccc;
100 form#sp_form input.text {
108 <h1><?php echo (empty($_GET['feed'])) ? 'SimplePie' : 'SimplePie: ' . $feed->get_title(); ?></h1>
110 <form action="" method="get" name="sp_form" id="sp_form">
111 <p><input type="text" name="feed" value="<?php echo ($feed->subscribe_url()) ? htmlspecialchars($feed->subscribe_url()) : 'http://'; ?>" class="text" id="feed_input" /> <input type="submit" value="Read" class="button" /></p>
114 <div id="sp_results">
115 <?php if ($feed->data): ?>
116 <?php $items = $feed->get_items(); ?>
117 <p align="center"><span style="background-color:#ffc;">Displaying <?php echo $feed->get_item_quantity(); ?> most recent entries.</span></p>
118 <?php foreach($items as $item): ?>
119 <div class="chunk" style="padding:0 5px;">
120 <h4><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a> <?php echo $item->get_date('j M Y'); ?></h4>
121 <?php echo $item->get_content(); ?>
123 if ($enclosure = $item->get_enclosure(0))
124 echo '<p><a href="' . $enclosure->get_link() . '" class="download"><img src="./for_the_demo/mini_podcast.png" alt="Podcast" title="Download the Podcast" border="0" /></a></p>';
133 Powered by <?php echo SIMPLEPIE_LINKBACK; ?>, a product of <a href="http://www.skyzyx.com">Skyzyx Technologies</a>.<br />
134 Page created in <?php echo round(microtime_float()-$start, 3); ?> seconds.