Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('magpierss/rss_fetch.inc');
- error_reporting(0);
- $url = "http://feeds.wired.com/wired/index";
- $url1 = "http://feeds.feedburner.com/GoFindTheOthers";
- $rss = fetch_rss($url);
- $rss1 = fetch_rss($url1);
- if ($rss) {
- $items = array_slice($rss->items, 0, 10);
- $news_string = "";
- foreach ($items as $item) {
- $news_string = $news_string. "<p><a href='"
- .$item['link']. "'>" .$item['title'].
- "</a></p>";
- }
- }
- if ($rss1) {
- $items = array_slice($rss1->items, 0, 10);
- $news_string1 = "";
- foreach ($items as $item) {
- $news_string1 = $news_string1. "<p><a href='"
- .$item['link']. "'>" .$item['title'].
- "</a></p>";
- }
- }
- ?>
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>My Feed</title>
- <!--[if lt IE 9]>
- <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <style>
- p{
- font-family: Helvetica;
- }
- </style>
- </head>
- <body>
- <?php
- echo $news_string;
- echo $news_string1;
- ?>
- </body>
- </html>
- <?php
- @ini_restore('error_reporting');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement