PDA

View Full Version : Crossed Domains: WEATHER.com: XML loads only on PC but fails on the server


mandalavillage
07-18-2007, 07:02 AM
Hello everyone:

I hope someone else passed through this point before: I have found many posts in google about this but no one has an aswer untill now (unless I have not reached it...) Well... to make it short:

I import the XML data provided by Weather.com (I suscribed before and etc etc.. everythying you nedd) The point is, I can display that XML data perfetly well when I run my application on the PC, but as soon as I upload this to the server it does NOT work any longer..... why ? I could find out that since Flash 7.0 appeared... it is forbbiden to import data from other websites.... but what do I do in this case ? because in this case they approve that data import.... !!! they even have the technical points to be aware of....

My server is PHP, if you know how to help me, please let me know, I will appreciate it, and so will do the rest of Flash-PHP community people.... ;)

Thanks in advance...

Scuba_Steve
07-18-2007, 04:51 PM
you need what's called a "cross-domain policy". all i know is what it's called - sorry i can't be of more help but search this forum and google for it.

adamkearsley
07-19-2007, 09:36 AM
a new security thing is now on flash to do with loading xml files (from what ive heard)
If you still need a weather flash system thing i will pop you a zip of an fla with a php and xml script i use.
(DEMO HERE)
http://www.adamkearsley.net/test/

mandalavillage
07-25-2007, 08:35 AM
Well , this was the solution I found: create a PHP file that receives the XML data from the other domain... then , this PHP fil itself sends inside my server to the Flash application, so Flash "thinks" this is the same domain data...

If someone wants to check for the solution just look for "PHP Proxy"

Thanks to everyone, and best regards !

adamkearsley
07-25-2007, 09:39 AM
yes your idea for php file does work, Exactly how i managed mine.
Works but can play up sometimes.
Ad.

Scuba_Steve
07-25-2007, 01:37 PM
hrm interesting idea. :)