A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: XML help needed!

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    36

    XML help needed!

    Hi there!

    Is it possible for a swf to get info from an XML file that is placed in a different domain? And if it is, how can I do it?

    Thanks for your help.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    upload a proxy php file to your server -
    PHP Code:
    <?php
    header
    ("Content-type: text/xml; charset=utf-8");
    echo 
    file_get_contents($_GET["dataURL"]);
    ?>
    go to it in Flash with -
    PHP Code:
    myXML.load("www.yoursite.com/proxy.php?dataURL=www.remotesite.com/some.xml"); 
    another option if no php is available and you can upload files to the remote site server is a crossdomain.xml policy file

  3. #3
    Member
    Join Date
    Jan 2009
    Posts
    36
    Thanks!! I'll try.

  4. #4
    Member
    Join Date
    Jan 2009
    Posts
    36
    IT WORK! Thanks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center