php[world] 2015 Call for Speakers

$HTTP_RAW_POST_DATA

(PHP 4, PHP 5)

$HTTP_RAW_POST_DATADonnées POST brutes

Description

Avertissement

Cette fonctionalité est devenue OBSOLETE depuis PHP 5.6.0. Nous vous encourageons vivement à ne plus l'utiliser.

$HTTP_RAW_POST_DATA contient les données POST brutes. Voir always_populate_raw_post_data.

En général, php://input doit être utilisé au lieu de $HTTP_RAW_POST_DATA.

add a note add a note

User Contributed Notes 3 notes

up
22
Ricardo Martins
2 years ago
what is exaclty raw POST data?

Answer:

$_POST can be said as and outcome after splitting the $HTTP_RAW_POST_DATA, php splits the raw post data and formats in the way we see it in the $_POST For example:

    $HTTP_RAW_POST_DATA looks something like this

key1=value1&key2=value2

    then $_POST would look like this:

$_POST = array(
    "key1" => "value1",
    "key2" => "value2",);
up
22
Ray dot Paseur at GMail dot com
5 years ago
To get the Raw Post Data:

<?php $postdata = file_get_contents("php://input"); ?>

Please see the notes here:
http://us.php.net/manual/en/wrappers.php.php
up
-1
Ray.Paseur Sometimes Uses Gmail
3 months ago
At PHP 5.6+ you can suppress the Deprecated messages by setting:

always_populate_raw_post_data = -1

More information here: https://bugs.php.net/bug.php?id=66763
To Top