Jump to content
Larry Ullman's Book Forums

russellt

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by russellt

  1. HartleySan, I just don't understand what you mean by 'grab the response'. The 201 response for the uploaded file looks like: <?xml version="1.0" encoding="UTF-8" ?> -<PostResponse> <Location>http://path1.serverdomain.com/path2/filename.ext</Location> <Folder>path1</Folder> <ID>path2/filename.ext</ID> <Etag>"random_alphanumeric"</Etag> </PostResponse> So, how do I grab that and place it inside a variable? I'd much prefer to do that than re-directing the server response and using $_GET. I'm particularly interested in assigning the <Location> node to a variable. thx.
  2. HartleySan, Thank you for your reply and your ideas. Your first sentence was the real issue. I didn't know how to pull the XML into a php variable. However, I have found a work around which allows me to use the XML response as a trigger to update my database. This means (I think) that the database will only update once the upload has been successful. FYI, I discovered that the server response is a standard html 201 response. This is new to me as I have only just begun to play with SDKs and 3rd party services. I was able to change the server call function such that, rather than deliver a 201 response, the server re-directs to another URL and appends the XML node values to the re-direct URL. Using php, I am now able to assign the appended values to variables using $_GET. (I discovered aftwerwards that Larry touches upon this on page 260 - no doubt he is nodding knowingly as he reads this ) So, I think I have my answer. Thanks again for your interest.
  3. Larry & all, I hope you can help point me in the right direction. Having searched far & wide for a solution, I'm beginning to question my sanity! My problem is working out how to handle an XML response from a 3rd party service. Scenario is: I upload a file to the 3rd party service, and receive a page back from the service confirming the upload. This page displays an XML root and some nodes(file location, unique reference, etc). I would like to use php to access the XML, the idea being to update my database record with some of the XML data to show that the file has been uploaded successfully. Question: How can I access the XML using php? All of the examples I have seen elsewhere assume that there is an xml file (eg. response.xml) which can be parsed(using simpleXML for example). However, the output from the server is not an XML file. As far as I can see, it is just an html page displaying XML data(and the view source has been disabled by the 3rd party service). An alternative, along the same lines: If I can't access the displayed XML, would it be possible to use the receipt of the XML response to trigger a database update using php. How would I do that? I would welcome any ideas. thx.
  4. Larry, No worries. I found a way to make it work: + datagrid.selectedItem.description + seems to work using Alert.show inside a doubleClickHandler function. It's a cool technology, but not immediately intuitive. Lots of trial & error for me, so far :-)
  5. Larry, Am a complete n00b to Flex/Actionscript but have diligently worked through the book, and am now starting to play with the technology. So go easy on me :-) My question: Am using Zend AMF on Wampserver to populate a DataGrid. I have a doubleClick event which, when the user doubleclicks a row on the datagrid, initialises the variable selectedRow:Object and opens a simple pop-up(Form, FormHeading, FormItem, TextInput and Button). I would like to take the data from a cell in the doubleclicked row eg selectedRow.description and add it to the FormHeading label of the pop-up, so that when the pop-up opens, the description cell from the row selected on the datagrid is displayed in the pop-up heading. I have made the variable 'selectedRow' bindable and am trying to insert {selectedRow.description} into the FormHeading label - somthing like <mx:FormHeading label = "This is the description + {selectedRow.description} "> in the pop-up, but no luck. No doubt, a n00b error. I'd welcome your thoughts. thx, russellt mysql 4.1.14 php 5.2.12 wampserver 2.1 flashbuilder 4.0
×
×
  • Create New...