2

In attempting to use the Magpie RSS parser, I'm getting the below errors:

A PHP Error was encountered
Severity: User Warning
Message: MagpieRSS: Failed to fetch http://careercenter.gammaiotasigma.org/jobs/?display=rss&keywords=&filter=SHOW_AT%3A740037&resultsPerPage=12. 
  (HTTP Error: connection failed (101))
Filename: plugins/pi.magpie.php
Line Number: 1387

A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: plugins/pi.magpie.php
Line Number: 104

In checking http status codes, 101 =

101 Switching Protocols
This means the requester has asked the server to switch protocols and the server is     
acknowledging that it will do so

Why would that be considered an http ERROR?

Magpie tag that causes the error:

{exp:magpie url="http://careercenter.gammaiotasigma.org/jobs/?display=rss&keywords=&filter=SHOW_AT%3A740037&resultsPerPage=12" limit="12" refresh="720"}
<ul>
    {items}
    <li><a href="{link}">{title}</a><br>
        {description}
    </li>
    {/items}
</ul>
{/exp:magpie}   

In THE SAME PAGE, I have this feed and it works:

{exp:magpie url="http://careers.independentagent.com/jobs?resultsPerPage=12&display=rss" limit="12" refresh="720"}
<ul>
    {items}
    <li><a href="{link}">{title}</a><br>
        {description}
    </li>
    {/items}
</ul>
{/exp:magpie}   

What am I doing wrong? I ran both through the validator and they are both valid feeds.

13
  • If one of them works and the other doesn't then that would suggest that either Magpie doesn't support multiple requests per page (so try removing the other one to test), or that it doesn't like the filter parameter in your query string: filter=SHOW_AT%3A740037. Does that site have any API documentation? How do you know to use that filter and if it's the correct format?
    – Ian Young
    Jun 12, 2014 at 9:30
  • Incidently the trailing slash after jobs (jobs/?...) shouldn't make any difference but if one works and the other doesn't then it's worth matching up to see exactly what part of the query Magpie doesn't like.
    – Ian Young
    Jun 12, 2014 at 9:35
  • @Ian, if I put in just the one that doesn't work, it still doesn't work.
    – MB34
    Jun 12, 2014 at 14:08
  • Also, removing the / didn't help. It still doesn't load, even when it is the only one on the page.
    – MB34
    Jun 12, 2014 at 14:11
  • If I strip down the url to just .../jobs/?display=rss it still doesn't work.
    – MB34
    Jun 12, 2014 at 14:21

1 Answer 1

2

Personally I wouldn't put too much reliance on Magpie. It's fine in simple use cases but if you want to grab an RSS/XML feed there are plenty of options to choose from‌​. I would suggest Feed Parser as a good free alternative.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.