Hello, Does anyone have a sample script or know how to accept and parse an xml script in PHP? A remote server is going to post an xml response and I need to make a php script to handel it. Any help would be great. Thanks, Kevin
See my old answer to similar question: http://forums.digitalpoint.com/showthread.php?p=1307976#post1307976
thanks for the link - very good advice. my main question is how to tell my php script to look for another script to post an xml file to it, and I could not seem to find that answer in the resources you mentioned in the other thread
I don't understand your question then. What do you mean by posting an xml to another script? You need to submit a form with POST method or what? Give an example.
Sorry for my lack of an explanation - my shipping company posts an xml form to my webserver any time a product is shipped. So, I do not know how to tell my script to look for this post.
I'm not sure what you mean. Look for what? Once the form data is posted, it is at the mercy of the webserver, so where does it get stored, if at all? Or are you parsing the form body? Give us a bit more information to work with. Also, you can use the DOMDocument class in PHP 5 to work with XML using the DOM API, if you are at all familiar with that.
Thanks for your responses, I'm sorry I've done such a poor job of explaining the situation. I will look into the DOMDocument class you mentioned and see if I can get this script working. So I guess having a site post an XML file is very similar to a site posting a POST form?