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
96
S
25
G
20
Posts: 3,055
Reputation: 22,646

Post » Wed Aug 29, 2012 9:53 pm

Anyone? i'm having issues how to enable CORS (Cross Domain)
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,646

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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
96
S
25
G
20
Posts: 3,055
Reputation: 22,646


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests