I'm trying to receive a webhook from hipmob (live chat app) that should be triggered at a chat event.
Documentation: https://www.hipmob.com/documentation/chat-events.html
I've been following How to catch the HTTP POST request sent by a Shopify Webhook , and i have to say that i am completly new to this. I tried the solution from the first answer but with no success.
this is what i did:
<?php
$webhookContent = "";
$webhook = fopen('php://input' , 'rb');
while (!feof($webhook)) {
$webhookContent .= fread($webhook, 4096);
}
fclose($webhook);
$file = 'webhook.txt';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
// Write the contents back to the file
file_put_contents($file, $current);
error_log($webhookContent);
?>
but with no success
I was able to solution it with: