On 27 Jul 2004 04:37:46 -0700, R. Rajesh Jeba Anbiah wrote:
Timothy Madden <ba****@rmv.spam.home.ro> wrote in message news:<1u*****************************@40tude.net>. .. On 26 Jul 2004 21:05:42 -0700, R. Rajesh Jeba Anbiah wrote:
Timothy Madden <ba****@rmv.spam.home.ro> wrote in message news:<ny****************************@40tude.net>.. .
<snip>
How do I get the HTTP request message body ? My request method is POST and
the message body contains the information I need
<snip>
Could you provide more details like some pseudo-code..? or perhaps
you may want to try print_r($GLOBALS) ??
Here's how it is:
A machine in my intranet, which is not a personal computer, but a SMS
gateway, will open a TCP/IP connection on port 80 on my webserver, using
regular sockets and will send the following:
POST /smschat/dispatch.php HTTP/1.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Length: 250
<xml>
<object>
<request>
<msisdn>0888567987</msisdn>
<mcc>040</mcc>
<mnc>010</mnc>
<body>I have a new SMS</body>
</request>
</object>
And after that the sms-gateway will start to receive data on the connection
from the webserver. This is what the sms-gateway does, not me or my script,
and is not something that I could easyly change. This just happens.
Now I am the author of '/smschat/dispatch.php' script on my webserver. What
I want in my php script is to get the body of the message, that is the
following:
<xml>
<object>
<request>
<msisdn>0888567987</msisdn>
<mcc>040</mcc>
<mnc>010</mnc>
<body>I have a new SMS</body>
</request>
</object>
</xml>
Note the value of the Content-Type header is not text/x-wwwform-urlencoded.
What do you think ? Anyone has any ideea ?
--
------------------------------------
Thank you
Timothy Madden
Romania
And I don't wanna miss a thing