Skip to content

Instantly share code, notes, and snippets.

@sisodiakaran
Created January 9, 2017 20:09
Show Gist options
  • Save sisodiakaran/de920f5a4082704069a999519224efc5 to your computer and use it in GitHub Desktop.
Save sisodiakaran/de920f5a4082704069a999519224efc5 to your computer and use it in GitHub Desktop.
Code to check webhooks
<?php
$postdata = http_build_query($_POST);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$g = file_get_contents("<webhookinbox url>", FALSE, $context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment