Re: How can I get the message-body ?

From: Manuel Lemos (mlemos_at_acm.org)
Date: 07/23/04


Date: Fri, 23 Jul 2004 11:51:09 -0300

Hello,

On Thu, 22 Jul 2004 16:54:03 +0300, Timothy Madden wrote:
> In my application I'll receive XML text in the HTTP-message body in a
> particular format that only my application understands
> My script will be requested by the client with HTTP POST and the HTTP
> request will contain the XML as reqest-message body
>
> I couldn't find a way to acces the POST message body in my script to parse
> the XML and extract my data. I know I can get the request-message headers
> and I know I can set some of the response-headers.
>
> How do I get the HTTP request message body ? My request method is POST and
> the message body contains the information I need

You may want to try this HTTP client class that lets you send POST
requests with arbitrary body data. It even comes with an example of
posting requests with XML body data:

http://www.phpclasses.org/httpclient

-- 
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html


Relevant Pages

  • Re: Object Oriented Content System - the idea
    ... >I expected php to be smarter then that. ... >form like bytecode in memory for the next request. ... each action added some stuff to a "response" XML document. ... that map/object/data and formats it for HTML display using an includeed PHP ...
    (comp.lang.php)
  • Re: Modular PHP
    ... How can I catch an event in PHP. ... Everything is done with XML, so you will want to be familiar with XSLT ... the function itentified by the Handler attribute in the above XML, ... It's also worth noting that all the XML parsing for the request map ...
    (comp.lang.php)
  • Re: Send XML from PHP to C++ Server
    ... | Is it possible to send an XML request from PHP to a C++ XML Server. ... the request, but the request itself...aka. ...
    (alt.php)
  • Re: Design involving composition of inherited members.
    ... I am designing classes to work with an API. ... The API operates via XML ... Each API call involves sending a request and ... If the data packets' semantics are unique to each messageID, then each API method would know which particular serialization to use. ...
    (comp.object)
  • Re: Securing an Email script
    ... request to our sales office. ... Since you do ZERO checking on the values it's nothing BUT security ... very powerful PHP function to validate form fields and other ...
    (comp.lang.php)