I am working on an integration between my PHP site and an ASP site with XML. The basic flow is this: I generate a request by placing XML into the value portion of an input tag called ³REQUEST² the action is the url of the remote ASP server which receives the request. It then returns a form with the same ³REQUEST² input tag with the XML as the value. My problem is getting the XML that is posted to the form. The confusing thing is that once I receive the XML data I am no longer in my site. The header information changes to the URL that sent the data.
I am not sure how to capture the data that is returned by the server. I have a procedure that puts XML data into my db from file. But I'm not sure how to get this result into a file. The ASP example that I am changing to PHP is Request.Form("Results") basically it gets the form's Results variable... How can you do that in PHP when nothing has been sent to the server?? Any insight would be very helpful... My code is below: Code that generates the request: $doc = domxml_new_doc('1.0'); $top_element = $doc->add_child($doc->create_element('ExchangeRequest')); $login_data_node = $top_element->add_child($doc->create_element('LoginData')); $login_data_node->set_attribute("UserName", "uname"); $login_data_node->set_attribute("Password", "pass"); $request_node = $top_element->add_child($doc->create_element('Request')); $request_node->set_attribute("Type", "RetrieveNewSearches"); //echo "<pre>Comment: "; print(htmlentities($doc->html_dump_mem(true))); echo "</pre>"; die; $xml = $doc->html_dump_mem(); $ns = strtr($xml, "\"", "'"); //echo "<pre>Comment: "; print($ns); echo "</pre>"; die; $html = "<html> <body> <form name=\"Exchange\" method=\"POST\" action=\"https://remoteaspserver/action.asp\"> <input type=\"text\" size=150 name=\"Request\" value=\"$ns\"></input> <br><br> <input type=\"submit\" value=\"Submit\"></input> </form> </body> </html>"; print($html); Code received by server: <html> <body> <input type="text" name="Results" value="<?xml version='1.0'?> <Results RequestSuccessful='True'> <Searches NumberIncluded='1'> <Search Type='data'> <ID>1</ID> <Comments/> </Search> </Searches> </Results> "></input> </body> </html> Thanks for your help! /Tim Best -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php