Am trying to use this code for my smf wap2 updates
<?php $rss = new DOMDocument();
$rss->load('http://www.spyloaded.com/index.php?action=.xml;type=rss;sa=news;limit=25;boards=5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed, $item);
}
echo '<strong><div class="titlebg">Latest Post<br></div></strong>';
$limit = 25;
for($x=0;$x<$limit;$x++) {
$title = str_replace(' & ', ' & ', $feed[$x]['title']);
$link = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$date = date('l F d, Y', strtotime($feed[$x]['date']));
echo '<div class="pagination"><a href="'.$link.'" title="'.$title.'"><div class="box"><table width="100%"><tbody><tr><td align="left"><img src="http://www.spyloaded.com/Themes/icons/spynews.jpg" height="45px" width="45px"></td><td><b>'.$title.'</b><br><div align="right"><font color="red"> '.$date.'</font></div></div></td></tr></tbody></table></div></a></div>';
}
?>
It works but the main problem am having is.
At any time the code will stop showing all the post. And after some hours it will display back.
Am looking for the good working one.