views:

657

answers:

3

I am getting news from Yahoo using an RSS feed, using:

XML.load("http://finance.yahoo.com/rss/topstories")

Yea this is legal and all, and although it works perfectly when my SWF is offline -- it shows a security error, but I allow my D drive "domain" in the Adobe Security Panel.

But as soon as I upload it to my server, and test it online:

  • In Firefox3 the data fails to load, giving me a message on the status bar "Transferring data from finance.yahoo.com"

  • In InternetExplorer7 it fails silently with no message or warning.

Whats happening? I've even put a crossdomain.xml file with a * wildcard (allowing all domains).

+1  A: 

Hi,

I'm not sure what exactly is wrong here, you need to give me some more details I think.

I highly recommend you read this completely.

http://www.adobe.com/devnet/flash/articles/fplayer8_security.html

Also, a cross domain is only applicable to the domain you are requesting to not from.

It may also help you to install Fiddler

http://www.fiddler2.com/fiddler2/

Or Charles

http://www.charlesproxy.com/

This will allow you better http debugging. My guess is that you have a conflicting security sandbox behavior.

Jotham
+2  A: 

The problem is with your crossdomain.xml ... Actually adding it on your site has no effect, you have to ask Yahoo to put it on their domain :-)

alex2k8
+2  A: 

Seems like you need a subdomain at Yahoo to access this.

http://finance.yahoo.com/crossdomain.xml

<cross-domain-policy>
    <allow-access-from domain="*.yahoo.com"/>
    <allow-access-from domain="us.js2.yimg.com"/>
</cross-domain-policy>

A quick walk-around is to set up a proxy-script on your own server. There's a lot of examples out there. Haven't tried this but the guy wrote it for the same reason as you :

http://www.abdulqabiz.com/blog/archives/general/php_proxy_script_for.php

Theo.T
Yeah great idea. So I'll just send a memo to the Yahoo Finance HOD asking him to "lend" me a subdomain indefinitely!
Jenko
:) the proxy is probably cheaper... I use this method a lot, so should be fine, good luck!
Theo.T