The service is unavailable.

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
105
S
29
G
28
Posts: 3,100
Reputation: 27,376

Post » Wed Aug 29, 2012 9:53 pm

Anyone? i'm having issues how to enable CORS (Cross Domain)
B
105
S
29
G
28
Posts: 3,100
Reputation: 27,376

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
62
S
22
G
14
Posts: 1,481
Reputation: 16,400

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
105
S
29
G
28
Posts: 3,100
Reputation: 27,376


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests