Hi All,
I have a PHP page that needs to read XML posted to this page. The post will be done by content-type: application/xml(not application/x-www-form-urlencoded).
For example, my page is called test.php, another server will post the XML to this page (test.php). My question is how can I create a code to this test.php page to read the xml posted to it?
UPDATE
First, thanks a lot for the answers and the time spent to help me. I´ll try to explaing better my problem. I´m creating a Messenger Robot. I´m using a plataform called "botplataform". More information here: http://code.google.com/p/botplatform/wiki/RobotServiceHostedOnWebServer
Basicaly this plataform works like this: I type a message on my instante messager (in this case MSN), the message that I typed is sent to my PHP page by a XML POST. The information of how this plataform do that is this:
"The post request content-type is application/xml(not application/x-www-form-urlencoded). So you should read the entire body as the xml data, you couldn't read any parameters."
My PHP file needs to "read" this XML to know what the user typep on MSN. And them I send back my answer to the botplataform that send the messege to the user.
I can send a answer to the botplataform, but I cant read the XML that the botplataform send to my php file.
If you want to test, just ad mainframe(at)xquad(dot)com(dot)br to your MSN an talk with it. It will only anser "Em manutencao" But it works, the php create a XML and echo it.
Thanks a lot, Flávio