1 |
41cc1b08
|
Assos Assos
|
<?php
|
2 |
|
|
include_once('../autoloader.php');
|
3 |
|
|
include_once('../idn/idna_convert.class.php');
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
$feed = new SimplePie();
|
7 |
|
|
if (isset($_GET['feed']) && $_GET['feed'] !== '')
|
8 |
|
|
{
|
9 |
|
|
if (get_magic_quotes_gpc())
|
10 |
|
|
{
|
11 |
|
|
$_GET['feed'] = stripslashes($_GET['feed']);
|
12 |
|
|
}
|
13 |
|
|
$feed->set_feed_url($_GET['feed']);
|
14 |
|
|
$feed->enable_cache(false);
|
15 |
|
|
$starttime = explode(' ', microtime());
|
16 |
|
|
$starttime = $starttime[1] + $starttime[0];
|
17 |
|
|
$feed->init();
|
18 |
|
|
$endtime = explode(' ', microtime());
|
19 |
|
|
$endtime = $endtime[1] + $endtime[0];
|
20 |
|
|
$time = $endtime - $starttime;
|
21 |
|
|
}
|
22 |
|
|
else
|
23 |
|
|
{
|
24 |
|
|
$time = 'null';
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
$feed->handle_content_type();
|
28 |
|
|
|
29 |
|
|
?>
|
30 |
|
|
<!DOCTYPE html>
|
31 |
|
|
<title>SimplePie Test</title>
|
32 |
|
|
<pre>
|
33 |
|
|
<?php
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
if (function_exists('memory_get_peak_usage'))
|
37 |
|
|
{
|
38 |
|
|
var_dump($time, memory_get_usage(), memory_get_peak_usage());
|
39 |
|
|
}
|
40 |
|
|
|
41 |
|
|
else if (function_exists('memory_get_usage'))
|
42 |
|
|
{
|
43 |
|
|
var_dump($time, memory_get_usage());
|
44 |
|
|
}
|
45 |
|
|
else
|
46 |
|
|
{
|
47 |
|
|
var_dump($time);
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
function callable_htmlspecialchars($string)
|
52 |
|
|
{
|
53 |
|
|
return htmlspecialchars($string);
|
54 |
|
|
}
|
55 |
|
|
ob_start('callable_htmlspecialchars');
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
print_r($feed);
|
59 |
|
|
ob_end_flush();
|
60 |
|
|
|
61 |
|
|
?>
|
62 |
|
|
</pre> |