comparison _xampp/contrib/xmlrss.php @ 0:b12c99b7c3f0

commit for previous development
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 19 Jan 2015 17:13:49 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b12c99b7c3f0
1 <?php
2 header("Content-Type: text/html; charset=utf-8;");
3 ?>
4 <html>
5 <head>
6 <title>PHP und XML_RSS</title>
7 </head>
8 <body>
9 <?php
10 include_once("XML/RSS.php");
11
12 $rss =& new XML_RSS('http://www.heise.de/newsticker/heise.rdf');
13
14 $rss->parse();
15
16 $meta=$rss->getChannelInfo();
17
18 echo "<h1>{$meta['title']}</h1>";
19 echo $meta['description'];
20 echo "<br>";
21 echo "<a href=\"{$meta['link']}\">mehr...</a>";
22 echo "<p>";
23
24 foreach ($rss->getItems() as $item)
25 {
26 echo "<a href=\"{$item['link']}\">{$item['title']}</a><br>";
27 }
28
29 ?>
30 </body>
31 </html>