Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Thanked 0 Times in 0 Posts

    XML to PHP _ PHP to XML

    Hi : )

    I have a swf (flash application) that can send an
    XML file to a specified URL. (say www.test.com/ad_querry.php )

    Is it possible to create a PHP code that would

    1) Fetch and read the XML file as it is sent from the flash application

    2) Execute an SQL querry given some information located in the XML file.
    (let say add a name and vote number to a database)

    3) Reconstruct an XML file given the new updated information (let say the new average of all the vote)

    4) Send back the file to the specified client.

    Thanks !!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    1. Yes.
    2. Yes.
    3. Yes.
    4. Sorta.

    All you listed above can be found in the DOM functions (DOMXML covers some of this if your version is < 5) on the api. Hopefully you have php 5.0 as the DOM is built into the core while the DOMXML functions of php 4 are both weaker and need to be added and configured.
    As with your last point, to my knowledge there is no way to force it. Passing xml to flash is not my specialty in the least.
    Normally if you simply read and write to a file, I don't believe you can signal another application using php that its complete. PHP can manipulate the file that the flash has generated, but its up to the flash to update its values. There may be a way to sorta stream the xml data into the flash, but I'm not certain on that one.
    As long as you can write the actionscript or at least know how it functions, you should be able to generate your new data.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

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