POST parsing troubles - PHP

This is a discussion on POST parsing troubles - PHP ; Hi, I have the following problem: An external system passes me a post request as bellow (server names etc changed): POST /cgi-bin/sms-weather HTTP/1.1 Host: sms-app.company.com X-Recipient: 12345:0:0 X-Sender: 040123456:0:0 X-Service: weather Content-Length: 7 WEATHER ================== I need to get all ...

+ Reply to Thread
Results 1 to 6 of 6

POST parsing troubles

  1. Default POST parsing troubles

    Hi,
    I have the following problem:
    An external system passes me a post request as bellow (server names etc
    changed):

    POST /cgi-bin/sms-weather HTTP/1.1
    Host: sms-app.company.com
    X-Recipient: 12345:0:0
    X-Sender: 040123456:0:0
    X-Service: weather
    Content-Length: 7

    WEATHER

    ==================
    I need to get all the X headears (which I can) plus the content from
    this POST. My problem is that the content is not a key/value pair, and
    so does not apear as a _POST[] variable or as apart of any other array I
    can think off (_REQUEST,apache_request_headers()).

    Any help will be gradly apreciated.

    Thanks in advance,
    Kyriacos Sakkas
    --
    Kyriacos Sakkas Netsmart Development Team
    Tel: + 357 22 452565 Fax: + 357 22 452566
    kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
    Taking Business to a New Level!

  2. Default RE: [PHP] POST parsing troubles

    > I need to get all the X headears (which I can) plus the
    > content from this POST. My problem is that the content is not
    > a key/value pair, and so does not apear as a _POST[] variable


    http://hu2.php.net/manual/en/ini.cor...-raw-post-data


    Felhõ

  3. Default Re: [PHP] POST parsing troubles

    Hodicska Gergely wrote:
    >>I need to get all the X headears (which I can) plus the
    >>content from this POST. My problem is that the content is not
    >>a key/value pair, and so does not apear as a _POST[] variable

    >
    >
    > http://hu2.php.net/manual/en/ini.cor...-raw-post-data
    >
    >
    > Felhõ

    My problem is how to acces the content, the above setting doesnt seem to
    load it into any of the arrays.

    --
    Kyriacos Sakkas Netsmart Development Team
    Tel: + 357 22 452565 Fax: + 357 22 452566
    kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
    Taking Business to a New Level!

  4. Default Re: [PHP] POST parsing troubles

    Hodicska Gergely wrote:
    >>I need to get all the X headears (which I can) plus the
    >>content from this POST. My problem is that the content is not
    >>a key/value pair, and so does not apear as a _POST[] variable

    >
    >
    > http://hu2.php.net/manual/en/ini.cor...-raw-post-data
    >
    >
    > Felhõ

    My problem is how to acces the content, the above setting doesnt seem to
    load it into any of the arrays.

    --
    Kyriacos Sakkas Netsmart Development Team
    Tel: + 357 22 452565 Fax: + 357 22 452566
    kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
    Taking Business to a New Level!

  5. Default Re: [PHP] POST parsing troubles

    Hodicska Gergely wrote:
    >>I need to get all the X headears (which I can) plus the
    >>content from this POST. My problem is that the content is not
    >>a key/value pair, and so does not apear as a _POST[] variable

    >
    >
    > http://hu2.php.net/manual/en/ini.cor...-raw-post-data
    >
    >
    > Felhõ

    my mistake on previus reply
    variable
    $HTTP_RAW_POST_DATA
    now contains the info i need.
    Thanks
    --
    Kyriacos Sakkas Netsmart Development Team
    Tel: + 357 22 452565 Fax: + 357 22 452566
    kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
    Taking Business to a New Level!

  6. Default Re: [PHP] POST parsing troubles

    Hodicska Gergely wrote:
    >>I need to get all the X headears (which I can) plus the
    >>content from this POST. My problem is that the content is not
    >>a key/value pair, and so does not apear as a _POST[] variable

    >
    >
    > http://hu2.php.net/manual/en/ini.cor...-raw-post-data
    >
    >
    > Felhõ

    my mistake on previus reply
    variable
    $HTTP_RAW_POST_DATA
    now contains the info i need.
    Thanks
    --
    Kyriacos Sakkas Netsmart Development Team
    Tel: + 357 22 452565 Fax: + 357 22 452566
    kyriacos(at)netsmart.com.cy http://www.netsmart.com.cy
    Taking Business to a New Level!

+ Reply to Thread