-2

I want know,from where should I provide username, password credential topher's code... I know it is some what silly question. I am not getting

$raw_post_data = file_get_contents('php://input');

how exactly works

Please help me...

Thanks in advance.. :)

Community
  • 1
  • 1
Shreejay Pendse
  • 194
  • 2
  • 13
  • Please don't edit your question into a different question. You can always ask a new question, but even your edited question lacks [minimal, complete code](http://stackoverflow.com/help/mcve) – Machavity Aug 04 '16 at 13:06
  • `I want know,from where should I provide username, password credential "topher's" code` this was my main question @Machavity – Shreejay Pendse Aug 06 '16 at 06:12

1 Answers1

0

Thanks for asking this. I learned something new today. This was answered in another post. You are actually doing the same as reading $HTTP_RAW_POST_DATA (wich is deprecated).

Usually when just submitting a basic form you want to read $_POST to get an array of elements php already splitted neatly for you:

$_POST = array(
"key1" => "value1",
"key2" => "value2",);

But when you actually need key1=value1&key2=value2 you want to get the "raw post data". Thats what file_get_contents('php://input'); does. file_gets_content is usually intended to read a file (local file or url).

Community
  • 1
  • 1
Hafenkranich
  • 1,696
  • 18
  • 32