I've been looking during a week on the internet all kind of answers to the way of receive the data from and http post, but none of them help me, I'm receiving data from a server wich is posting by http post to mine the connection is working and its seems the is sending OK the HTTP POST, but I cant find the way of showing the information, the Json structure of what is posting is something like this :{"decodes":[{"id" : 64,"rmv" : "xxxxx","frameID" : xxxxx,"spaced" : "xxxxx", "SF":"xxxxxx"}] }
I've tried to read in all ways the most simple with:
file_get_contents(php://input);
echo '<pre>';
print_r($_POST);
$data = json_decode(file_get_contents('php://input'), true);
print_r($_POST);
var_dump($_POST);
I only received or empty Array
or NULL
, Im very frustrated I dont know what Im I missing, there is a guy who has this website where you can try to make your http post there, and when I point there is working perfectly and he received with no problems.
I hope some one can help me. Thank you.
IF you receive the data, clearly file_get_contents
will not help you.
Maybe you can have a look at POSTMAN, it's a Chrome extension that allow you to post some data to an url.
url is https://www.getpostman.com/
the data is being posting to me by http post json from a website where I just have to write url where I want the data to be send, the url has to be like this link where document is the file in php where I want to show the data that is being posted and then insert into the database but the case is I cant even show the data Im receving, always receive null or empty array or array{0}() I have tried aswell just to receive with file_get_content(php://input) and then with file_put_contents write and create a file with the suposed data Im receving but the file contains nothing, Thank you all for the answers.