A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: loading remote server xml

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    12

    loading remote server xml

    ok, its takn me a while but im finally xml'n with flash.
    ive produced some live feeds which work fine with flash but this
    issue with remote server security is tripn me up, so guys whats the quickes way around this?

    ie i need a html popup to sit on a remote server which calls up a swf reading xml both located on my servers - just wont work at present?

    and help really appreciated...
    +z++ph+

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    199
    you cam proxify your local connection with a small php script:

    <?php

    $dataURL = "http://www.thatotherdomain.com/myfile.xml";

    //note that this will not follow redirects
    readfile($dataURL);

    ?>


    you can use just about any server side language to do this. php is simply the easiest.

  3. #3
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    I have a number of proxy type servers in the Flash-XML FAQ:

    Just pick your language:

    http://www.tupps.com/flash/faq/

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  4. #4
    Junior Member
    Join Date
    Oct 2001
    Posts
    12
    thanx for the info guys, much appreciated, however not being too familiar with server side scripting could explain how i would implement a redirect if i have

    somewhere.com/data.xml
    somewhereEsle.com/flash.swf
    somewhereEsle.com/holdsflash.html

    do i need to add extra files or add the script to the html page hosting the flash file?

    thankx again
    +z++ph+

  5. #5
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    You will need some form of scripting to redirect the XML file on the somewhereElse.com server.

    So you would have:

    somewhere.com\myxml.xml
    somewhereElse.com\myXMLgrabber.php
    (this reads from somewhere.com and presents it as a local file)
    somewhereElse.com\flash.swf
    (points to myXMLgrabber.php on the same server)
    somewhereElse.com\holdsflash.html
    (no changes)

    Thanks
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  6. #6
    Junior Member
    Join Date
    Oct 2001
    Posts
    12
    hi there again, unfortunately i cannot use php, only asp
    is permisable with my server...

    ive tried loading asp with a redirect to xml into my flash file and again it works fine running from my desktop but on uploading it fails.

    i have

    myxml.xml
    redirect.asp
    on one server.

    and
    myflash.swf
    on the other.....

    myflash.swf loads the asp file which redirects to the xml file..

    can anyone give me a clear example or show me how to get this to work,

    thanks,

    z
    +z++ph+

  7. #7
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    You want the redirect.asp to be on the same server as the flash file.

    Another option (or trick) is that the flash file takes its security settings from the server that delivered the html file that loaded the swf file.

    So if you had:

    Server1.com
    data.xml
    swfloader.html

    Server2.com
    myCoolFlash.swf

    And the myCoolFlash was loaded by the swfloader.html file then the swf file could read html files from server1.com, but *not* server2.com.

    So if your flash file can be delivered by a static html file drop it on the server with the XML file.

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

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