Created
June 4, 2020 19:35
-
-
Save corypina/c1a99f83b61e60e1ef8796aa702920be to your computer and use it in GitHub Desktop.
Test webhook content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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