|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-29 23:52 UTC] iliaa@php.net
[2002-08-29 23:57 UTC] blueeye at mail dot blueeye dot idv dot tw
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 23:00:01 2026 UTC |
May I directly read the RAW POST-METHOD informations? In Perl, we use read(STDIN, $buffer, $ENV{"CONTENT_LENGTH"}); but in php, I use <? $fs = fopen("php://stdin", "r"); $contents = fread($fs, $CONTENT_LENGTH); fclose($fs); ?> seems not to work. I got this problem when I EXPORT FAVORITE by JavaScript. informations are passed by POST method. We know that variables from anywhere are stored in some associative arrays, maybe $GLOBALS, $_POST , or others. But the informations passed by POST is a huge string, should not be parsed as parse_str() do. if it's passwd by GET method, I can use $GLOBALS['QUERY_STRING'] to get them. but how can I read raw POST data? thanks to read my post.