Skip to content

Instantly share code, notes, and snippets.

@corypina
Created June 4, 2020 19:35
Show Gist options
  • Save corypina/c1a99f83b61e60e1ef8796aa702920be to your computer and use it in GitHub Desktop.
Save corypina/c1a99f83b61e60e1ef8796aa702920be to your computer and use it in GitHub Desktop.
Test webhook content
<?php
// Test webhook reception
echo "Checking for webhook";
$webhookContent = "";
$myfile = fopen("./webhook.log", "a") or die("Unable to open file!");
$webhook = fopen('php://input' , 'rb');
while (!feof($webhook)) {
$webhookContent .= fread($webhook, 4096);
}
$txt = "START----------\n" . $webhookContent . "\nEND------------\n\n";
fwrite($myfile, $txt);
fclose($myfile);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment