RSS Error

liunx

Guest
Hi ,
I am using php script for displaying rssfeed.. But i am getting error , for which i really dont have any idea.

error is: MagpieRSS: Failed to fetch <!-- m --><a class="postlink" href="http://rss.news.yahoo.com/rss/topstories">http://rss.news.yahoo.com/rss/topstories</a><!-- m --> (HTTP Error: connection failed ()

When i open this url in browser it works finee...

Following changes I have made in php.ini file..
allow_url_fopen = On (earlier it was off)
register_globals = On (earlier it was off)

Even i have changed proxy settings accordingly in php.ini file..

But the result is same...


So anyone cal help me out!!!

My script code :

<?php
include('rss_fetch.inc');// Set error reporting for this
error_reporting(E_ERROR);// Fetch RSS feed
$rss = fetch_rss('http://rss.news.yahoo.com/rss/topstories');
if ($rss)
{
// Split the array to show first 5
$items = array_slice($rss->items, 0, 5);
// Cycle through each item and echo
foreach ($items as $item )
{
echo '<li><a href=http://www.phpbuilder.com/board/archive/index.php/"'.$item['link'].'">'.$item['title'].'</a> - '.$item['author'].'</li>';
}}else { echo '<h2>Error:</h2><p>'.magpie_error().'</p>';}
//('error_reporting');
?>TURN REGISTER GLOBALS OFF!!! That is a HUGE security hole, and you don't need it. Ever.

What does "rss_fetch.inc" look like?

~BrettYour script worked fine even with register globals off ;)
 
Back
Top