PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

http_get_request_headers> <http_get_request_body_stream
Last updated: Fri, 05 Sep 2008

view this page in

http_get_request_body

(PECL pecl_http:0.10.0-1.5.5)

http_get_request_bodyGet request body as string

Description

string http_get_request_body ( void )

Get the raw request body (e.g. POST or PUT data).

This function can not be used after http_get_request_body_stream() if the request method was another than POST.

Parameters

Return Values

Returns the raw request body as string on success or NULL on failure.

See Also



add a note add a note User Contributed Notes
http_get_request_body
neil at foo dot co dot za
29-Feb-2008 10:40
Like php://input and http_get_request_body_stream(), http_get_request_body() doesn't seem to work with enctype="multipart/form-data".
osborn dot steven at gmail dot com
23-Aug-2007 08:01
For those of you without the HTTP extension, try:
<?php
  $body
= @file_get_contents('php://input');
?>

http_get_request_headers> <http_get_request_body_stream
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites