2 include_once('../simplepie.inc');
3 include_once('../idn/idna_convert.class.php');
6 $feed = new SimplePie();
7 if (isset($_GET['feed']) && $_GET['feed'] !== '')
9 if (get_magic_quotes_gpc())
11 $_GET['feed'] = stripslashes($_GET['feed']);
13 $feed->set_feed_url($_GET['feed']);
14 $feed->enable_cache(false);
15 $starttime = explode(' ', microtime());
16 $starttime = $starttime[1] + $starttime[0];
18 $endtime = explode(' ', microtime());
19 $endtime = $endtime[1] + $endtime[0];
20 $time = $endtime - $starttime;
27 $feed->handle_content_type();
30 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
31 <title>SimplePie Test</title>
35 // memory_get_peak_usage() only exists on PHP 5.2 and higher if PHP is compiled with the --enable-memory-limit configuration option or on PHP 5.2.1 and higher (which runs as if --enable-memory-limit was on, with no option)
36 if (function_exists('memory_get_peak_usage'))
38 var_dump($time, memory_get_usage(), memory_get_peak_usage());
40 // memory_get_usage() only exists if PHP is compiled with the --enable-memory-limit configuration option or on PHP 5.2.1 and higher (which runs as if --enable-memory-limit was on, with no option)
41 else if (function_exists('memory_get_usage'))
43 var_dump($time, memory_get_usage());
51 function callable_htmlspecialchars($string)
53 return htmlspecialchars($string);
55 ob_start('callable_htmlspecialchars');