I am struggling with getting the info I want from a webhook with php
If I use in my php file
$fullrequest = file_get_contents(‘php://input’);
I get back the contents
event=CellVendEvent&data=2000&published_at=2016-05-12T16%3A23%3A44.254Z&coreid=XXXXXXXXXXXXXXXXXXXXX
Now if I want to strip out just the data portion, i.e. get 2000 I can’t get it to work.
I have tried
$data = $_POST[“data”];
and tried
$data = htmlentities($_POST[“data”]);
and tried
$json = $_POST[];
$decoded = json_decode($json, true);
$data = $decoded->data;
just not winning.
All I want to do is get the value out of the POST.
Cheers
Michael