raw POST data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy Starkey

    #1

    raw POST data

    Is there a way to access the raw data sent to a PHP app via POST? I'm
    trying to read the XML sent by a Flash program with XML.send() and its sent
    via POST but not URL encoded. PHP is expecting URL encoding so it comes in
    like:

    $_POST['<?xml version'] = '"1.0"?>'

    Perl can read it just fine like so:

    read (STDIN, $rawpost, $ENV{'CONTENT_L ENGTH'});
    s/\&amp;/\&/g;

    But since I'm a PHP kind of guy I'm wondering if there's a way to do this in
    PHP.


  • Andy Hassall

    #2
    Re: raw POST data

    On Fri, 27 Jun 2003 18:57:35 GMT, "Roy Starkey" <rstarkey@austi n.rr.com> wrote:
    [color=blue]
    >Is there a way to access the raw data sent to a PHP app via POST? I'm
    >trying to read the XML sent by a Flash program with XML.send() and its sent
    >via POST but not URL encoded. PHP is expecting URL encoding so it comes in
    >like:
    >
    >$_POST['<?xml version'] = '"1.0"?>'
    >
    >Perl can read it just fine like so:
    >
    > read (STDIN, $rawpost, $ENV{'CONTENT_L ENGTH'});
    > s/\&amp;/\&/g;
    >
    >But since I'm a PHP kind of guy I'm wondering if there's a way to do this in
    >PHP.[/color]

    Try the poorly documented $GLOBALS['HTTP_RAW_POST_ DATA'] variable and the
    always_populate _raw_post_data configuration directive in php.ini

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    Working...