Welcome! » Log In » Create A New Profile

Like us on Facebook:
http://www.facebook.com/tradebits

Follow us on Google+:
Tradebit on Google+


MagpieRSS: Failed to fetch

Posted by bfmrhm 
MagpieRSS: Failed to fetch
September 08, 2006 05:09PM

After months of no problems, I can no longer fetch the feed with php. I have tried CaRP as well as MagPie. Other feeds will work. Feeds from tradebit will not work for me.


Error:

MagpieRSS: Failed to fetch [www.tradebit.com]. (HTTP Response: )

I put the feed through RSS Validator and it passes. I can view the feed with FireFox. I don't see the problem.

Help,
Bill
Re: MagpieRSS: Failed to fetch
September 08, 2006 05:18PM
hi bill,

strange, i have been working with magpie myself and the RSS feeds worked so far...

would you mind to share your code with me? I fetch the music from here myself for some other domains to show them!

did you change ANYTHING on the code? Did you activate the CACHE? maybe you need the flush the cache!

ralf
Re: MagpieRSS: Failed to fetch
September 08, 2006 05:50PM
Hi Ralf,
The cache is fine. I've tried CaRP also , with the same results.

This will read Newegg, but not Tradebit.

<?php include('rss_fetch.inc');

// Set error reporting for this
error_reporting(E_ERROR);

// Fetch RSS feed
$rss = fetch_rss('http://www.newegg.com/Product/RSS.asp?Category=34&Brand=1028&N=2010340343+50001028+1050706980+1051707439&Submit=ENE&Nty=1&SubCategory=343&DEPA=1');
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="'.$item['link'].'">'.$item['title'].'</a> - '.$item['description'].'</li>';
}
}
else
{
echo '<h2>Error:</h2><p>'.magpie_error().'</p>';
}
// Restore original error reporting value
@ini_restore('error_reporting');
?>

Bill

Re: MagpieRSS: Failed to fetch
September 09, 2006 10:12AM
hi,

that could be the time limit, here is my working code:

<?PHP
require_once("magpierss/rss_fetch.inc"winking smiley;

set_time_limit(0);

$relbase="../";

$url="[www.tradebit.com];;

$rss = fetch_rss( $url );

foreach ($rss->channel as $channel)
{
  $channellink=$channel["link"];
}

print $channellink;

foreach ($rss->items as $item)
{
  $href = $item['link'];
  $title = $item['title'];
  $descr=$item['description'];

  print $title.": ".$href."\n";
}
?>
Re: MagpieRSS: Failed to fetch
September 09, 2006 06:46PM
Hi
I get the same results with your code. Other feeds work, but not Tradebit feeds.

This CaRP code works


<?php
require_once 'carp/carp.php';

CarpShow('http://www.geckotribe.com/press/rss/pr.rss');
?>

This does not work for me--

<?php
require_once 'carp/carp.php';

CarpShow('http://www.tradebit.com/forum/rss.php');
?>

What I did next--

I saved my feed
(http://www.tradebit.com/layouts/rss.php/UPLOADED/10882/10/news.xml)locally.
Both MagPie and CaRP will process the file without errors.

In Magpie--

<?PHP
require_once("rss_fetch.inc"winking smiley;


$url="[www.nmblaptops.com];;

$rss = fetch_rss( $url );


foreach ($rss->items as $item)
{
$href = $item['link'];
$title = $item['title'];
$descr=$item['description'];

print '<a href=".$href.">'.$title.'</a><br />'.$descr.'<br />';
}
?>

In CaRP with same formating---

<?php
require_once 'carp/carp.php';

CarpShow('news.xml');
?>

Any more ideas???
Bill



Re: MagpieRSS: Failed to fetch
September 10, 2006 08:49AM
bill, i am honestly clueless, because the code works for me! very strange! do you see any differences? have you tried your code with the set_time_limit command? maybe it is a time out!

ralf
Re: MagpieRSS: Failed to fetch
September 10, 2006 08:51AM
by the way: the url of your feed looks fine with the RSS validator, too... really no idea, what i can do sad smiley

if you find out anything, please let me know! maybe it would work, if you pass your feed through feedburner.com? like this one: [feeds.feedburner.com]

register your feed and use their url to parse it?

ralf
Re: MagpieRSS: Failed to fetch
September 10, 2006 11:04AM
Good Morning Ralf,
Feedburner is a nice wraper for the feeds and it does work for me. I believe my problem is somewhere in GoDaddy Linux hosting(php verion 4.3.11/CGI/FastCGI.) I can fetch Tradebit feeds just fine on Verizon Linux hosting(php version 4.4.1/Apache.)

More later,
Bill
Re: MagpieRSS: Failed to fetch
September 11, 2006 01:00AM


fopen("[www.tradebit.com];, "r"winking smiley

hangs on Godaddy hosting, not on Verizon.

fopen("[rss.weather.com];, "r"winking smiley

works

I'm going to bed,
Bill
Re: MagpieRSS: Failed to fetch
September 11, 2006 02:00PM
strangeeeee!!! haven't had such a bug for a long time... i guess it is not the hosting, just the PHP version!

ralf
Sorry, only registered users may post in this forum.

Click here to login