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?
<>>>>>
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."
我的PHP文档需要“阅读”这一XML,以了解MSN的用户类型。 并且,我回过头来回答向用户寄送 m子的机器人。
我可以向机器人发送一个答案,但我可以读到XML,即机器人发送到我的实验室档案。
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.
感谢抽签,Flávio