Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: XML to PHP _ PHP to XML
06-03-2007, 01:37 AM #1
- 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.
06-03-2007, 09:23 AM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,650 Times in 2,619 Posts
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');