[Solved] Webhook and php

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

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.


$_POST[“data”]; should work if it is indeed a POST variable.

Could you post your webhook configuration ?

This is what I have used successfully:

$event                     = $_POST['event'];
$data                      = $_POST['data'];
$published_at              = $_POST['published_at'];
$coreid                    = $_POST['coreid'];

1 Like

Thanks for your help.

It was the use of double quotations which was causing the problem. Changed to single quotes and everything works.

Funny how you get blinded - glad we have this community to help