-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththehindu.php
86 lines (70 loc) · 2.21 KB
/
thehindu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<title>NewsFeedsWeb</title>
<meta charset="utf-8">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<script type="text/javascript" src="//cdn.chitika.net/getads.js" async></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
var feedUrl="http://www.thehindu.com/?service=rss";
google.load("feeds", "1");
function initialize() {
var feed = new google.feeds.Feed(feedUrl);
var rssoutput="";
feed.setNumEntries(10);
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
rssoutput+="<br><div class=\"newsBox\"><a class=\"newsTitle\" href='" + entry.link + "'>" + entry.title + "</a><br>"
rssoutput+="<a class=\"newsDate\">"+ new Date(entry.publishedDate) +"<a><br>"
rssoutput+="<a class=\"newsSnippet\">"+ entry.contentSnippet +"<a><br>"
rssoutput+="<a>"+entry.content+"<a><br></div>"
container.innerHTML=rssoutput
}
}
});
}
google.setOnLoadCallback(initialize);
</script>
</head>
<body>
<header>
<?php include 'header.php';?>
</header>
<nav></nav>
<aside class="sidebar-left">
<?php include 'sidemenu.php';?>
</aside>
<aside class="sidebar-right">
<div>
<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = {"calltype":"async[2]","publisher":"manish434k","width":250,"height":650,"sid":"Chitika Default"};
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
}());
</script>
</div>
</aside>
<section>
<article>
<div>
<img class="imgNewsAuthor" src="http://www.thehindu.com/template/1-0-1/gfx/logo.jpg" alt="Times Of India" align="center">
</div>
<div id="feed"></div>
</article>
</section>
<footer>
<?php include 'footer.php';?>
</footer>
</body>
</html>