View difference between Paste ID: pWTGW6rV and WfadPEvJ
SHOW: | | - or go back to the newest paste.
1
<?php
2
3-
header("Content-type:text/javascript");
3+
4
5
error_reporting(0);
6
7
$url = "http://feeds.wired.com/wired/index";
8
$url1 = "http://feeds.feedburner.com/GoFindTheOthers";
9
$rss = fetch_rss($url);
10
$rss1 = fetch_rss($url1);
11
if ($rss) {
12
13
	$items = array_slice($rss->items, 0, 10);
14
15
	$news_string = "";
16
17
	foreach ($items as $item) {
18
19
		$news_string = $news_string. "<p><a href='"
20
21
		.$item['link']. "'>" .$item['title'].
22
23
		"</a></p>";
24
25
	}
26
27
}
28
if ($rss1) {
29
30
	$items = array_slice($rss1->items, 0, 10);
31
32
	$news_string1 = "";
33
34
	foreach ($items as $item) {
35
36
		$news_string1 = $news_string1. "<p><a href='"
37
38
		.$item['link']. "'>" .$item['title'].
39
40
		"</a></p>";
41
42
	}
43
44
}
45
?>
46
47
<!doctype html>
48
<html lang="en">
49
<head>
50
  <meta charset="utf-8">
51-
@ini_restore('error_reporting');
51+
  <title>My Feed</title>
52
  <!--[if lt IE 9]>
53-
?>
53+
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
54
  <![endif]-->
55
</head>
56
<style>
57
p{
58
  font-family: Helvetica;
59
}
60
</style>
61
<body>
62
<?php
63
echo $news_string;
64
echo $news_string1;
65
?>
66
</body>
67
</html>
68
69
<?php
70
@ini_restore('error_reporting');