Hi there, I have come across some problems when trying to enter an rss feed into my existing index.php file If anyone could help me and set me on the right track I would forever be greatful and add some rep of course! This is the code I want to include in the index page for the news feed: <? readfile('http://www.rss-info.com/rss2.php?integration=php&windowopen=1&rss=http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories&number=5&width=50&ifbgcol=FFFFFF&bordercol=D0D0D0&textbgcol=F0F0F0&rssbgcol=F0F0F0&showrsstitle=1&showtext=1'); ?> it is php code there is also an option for javascript code: this is the javascript code instead: <script language="javascript" src="http://www.rss-info.com/rss2.php?integration=js&windowopen=1&rss=http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories&number=5&width=50&ifbgcol=FFFFFF&bordercol=D0D0D0&textbgcol=F0F0F0&rssbgcol=F0F0F0&showrsstitle=1&showtext=1"> </script> This is the part of my index.php file that I would like to integrate it into. <img src="images/marker_o.gif" alt="" style="margin-left: 6px;"><strong class="white">In The News</strong></div> </td> </tr> <tr> <td style="background: transparent url(images/1_tall1.gif) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;" height="225" valign="top" width="216"> <table border="0" cellpadding="0" cellspacing="0"> <!--tbody--> <tbody> <tr> <td style="background: transparent url(images/tall_y.gif) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;" height="69" valign="top" width="216"> <div style="margin-left: 15px; margin-top: 17px; margin-right: 16px;"> <img src="images/pointer_r.gif" alt="" style="margin-right: 4px;"><strong class="red2">20/02/2006</strong> - Lorem ipsum dolor sit amet consectetuer adipiscing elit. Praesent vestibulum. </div> </td> </tr> <tr> <td height="156" valign="top" width="216"> <div style="margin-left: 15px; margin-top: 2px; margin-right: 17px;"> <img src="images/hl.gif" alt=""><br> <br style="line-height: 15px;"> <img src="images/pointer_o.gif" alt="" style="margin-right: 4px;"><strong class="orange">20/02/2006</strong> - Lorem ipsum dolor sit amet consectetuer adipiscing elit. Praesent vestibulum. <br> <br style="line-height: 16px;"> <img src="images/hl.gif" alt=""><br> <br style="line-height: 15px;"> <img src="images/pointer_g.gif" alt="" style="margin-right: 4px;"><strong class="green">20/02/2006</strong> - Lorem ipsum dolor sit amet consectetuer adipiscing elit. Praesent vestibulum. <br> <br style="line-height: 10px;"> <div style="margin-left: 121px;"><a href="#" class="blue">more news</a><img src="images/pointer2.gif" alt="" style="margin-left: 6px;"></div> </div> </td> </tr> <!--/tbody--> </tbody> </table> </td> </tr> Can anyone help??
Don't even bother wasting your money. Seriously. I'm presuming you need an RSS parser that can convert the feed into HTML, right? If you do, I have one you can use (it's free) that will save a copy of the feed into a local cache then serve the cached copy of the feed at run-time (thus saving the host server from your server sucking down its bandwidth like a pig at a feeding trough) every hour (or whenever you specify). From what I can see of your HTML code, you're using regular HTML, rather than XHTML (I'd have to change the parser to accomodate that, but it can be done). Does your HTML output include a complete and valid DOCTYPE declaration?