Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
PHP xml rss reader
SUBMITTED BY:
Guest
DATE:
Oct. 22, 2013, 1:41 p.m.
FORMAT:
PHP
SIZE:
495 Bytes
Raw
Download
Tweet
HITS:
1059
Go to comments
Report
<?php
$html
=
""
;
$url
=
"http://www.developphp.com/feed_latest_texttuts.php"
;
$xml
=
simplexml_load_file
(
$url
);
for
(
$i
=
0
;
$i
<
10
;
$i
++
){
$title
=
$xml
->
channel
->
item
[
$i
]
->
title
;
$link
=
$xml
->
channel
->
item
[
$i
]
->
link
;
$description
=
$xml
->
channel
->
item
[
$i
]
->
description
;
$pubDate
=
$xml
->
channel
->
item
[
$i
]
->
pubDate
;
$html
.=
"<a href='
$link
'><h3>
$title
</h3></a>"
;
$html
.=
"
$description
"
;
$html
.=
"<br />
$pubDate
<hr />"
;
}
echo
$html
;
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus