Get RSS?

Get help using Construct 2

Post » Wed Aug 29, 2012 6:55 am

Is possible to get RSS from other site using AJAX?
B
91
S
31
G
29
Posts: 3,129
Reputation: 27,789

Post » Wed Aug 29, 2012 9:53 pm

Anyone? i'm having issues how to enable CORS (Cross Domain)
B
91
S
31
G
29
Posts: 3,129
Reputation: 27,789

Post » Wed Aug 29, 2012 9:57 pm

you can set a php file in your domain with the following code :
[code]<?php
$rss = file_get_contents("http://something.com/rss");
echo($rss);
?>[/code]
and then query this file via AJAX
but you might have some trouble parsing it since for now the XML object doesn't seem to like namespaces.
and of course it won't work for preview.Yann2012-08-29 21:57:34
B
63
S
22
G
14
Posts: 1,482
Reputation: 16,432

Post » Wed Aug 29, 2012 10:43 pm

[QUOTE=Yann] you can set a php file in your domain with the following code :
[code]<?php
$rss = file_get_contents("http://something.com/rss");
echo($rss);
?>[/code]
and then query this file via AJAX
but you might have some trouble parsing it since for now the XML object doesn't seem to like namespaces.
and of course it won't work for preview.[/QUOTE]

Thanks for your help. I would like to ask you something, did you try to Load URL from Image for a sprite, in that case, you get a Google logo image URL? It didn't work for me.
B
91
S
31
G
29
Posts: 3,129
Reputation: 27,789


Return to How do I....?

Who is online

Users browsing this forum: KaptanZorba, Momio, wirelesstkd and 10 guests