jQuery.getFeed Feed Question
- Started
- Last post
- 15 Responses
- thebottlerocket
Hoping someone can help me out here. Not really done anything with JQuery before but I am trying to use this getFeed library to incoporate my blog RSS into another page on my site.
The example files uses a proxy to get the rss, and looks like this:
url: 'proxy.php?url=http://www.hovinn...
My feed looks like this:
url: 'proxy.php?url=http://www.thebot...But returns zilch.
Has anyone used that and can anyone shed some light on this? Or how I can go about solving this myself?
Cheers in advance
- Stugoo0
do you have an online example?
- rafalski0
Using this I presume?
http://www.hovinne.com/blog/inde…I only installed it for testing one day but it worked ok for me.
- thebottlerocket0
Yeah, thats the one i was using, it does work fine for the examples they give.
(QBN may clip the code here..but here goes)
Their URL looks like this:
http://www.hovinne.com/feed/However, mine looks like this and i think that is the problem:
http://www.thebottlerocket.co.uk…
- thebottlerocket0
Uploaded the code into PasteBin if that helps shed some light:
- rounce0
Load the Jquery.js last, the plugins need to be loaded first iirc.
- rounce0
You might also want tell it to run the JS.
$(document).ready(function()
{
jQuery.getFeed({
url: 'slowblowlowjobfeed.php',
success: function(feed) {
alert("Feed title: " + feed.title);
}
});
});
- thebottlerocket0
Thanks for this ronce, it seems my gut instinct was correct, the proxy seems to only want accept http requests, not feed requests.
Changing my url to http still doens't work that. The alert returns nothing.
- rafalski0
Some hosting providers these days disallow pulling data in from different domains for security reasons, I remember a hosting company writing about it in their newsletter just as I investigated the same script. I didn't host it with them though.
- thebottlerocket0
Doesn't using the proxy.php get around the security sand-box?
- thebottlerocket0
Actually, it seems to be the format of the feed itself:
I have an alert in the success: function(feed) that returns feed.title.
This is executing, but no title is being returned.
- rafalski0
It does pass the sand-box for the browser, but I've seen a hosting provider, I think Hosting365 introduce similar settings for their server-side services. I'm not a server-side specialist though, just thinking of an explanation to the script not working.
Do you have a local php environment? Does it work there?
- thebottlerocket0
yeah, I am running it locally, and it fails locally as well and it fails with my URL's but succeeds with the examples URLS.
The thing is, I know less about RSS than I do about jquery, so I am just upturning stones here hoping something works.
- rounce0
Try using the get load method and then try displaying the contents of what was loaded (what should be unparsed XML) and diagnose further from there.
And it's Rounce, as in my surname (and http://dictionary.reference.com/…). I usually get it pronounced roo-once, rounk, usually by people who fail it see it's ounce with an R on the front. </rant>
- thebottlerocket0
The first para does help. Thanks for that. I didn't mean to annoy you with the 'mispronunciation', but i guess I was done in with my spelling, in my head i heard "Rounce" but probably typed something nowhere near that.
- thebottlerocket0
Finaly got closer to a solution thanks to rounce and a friend of mine.
Using the get Method, worked out there was no XML returned when using the feedburner URL. Which is odd, as it seems a specific problem to my blog on feedburner rather than all feedburner blogs.As this blog is using wordpress a workaround was to use http://blogaddress/rss2.php within the domain itself.