How to handle POST data sent from Blockcypher WebHook API I've been trying to get this to work for the past 3 days and I've all but given up on it. Basically, I've used requestb.in to monitor if any POST requests are going through; requestb.in always displays a response. However, I can't replicate this on my own website. 

I simply can't find a way to read the body of the response that's getting called back to my server. 

For reference, I'm using this sample provided by BlockCypher:

 require __DIR__ . '/../bootstrap.php';

$webHook = new \BlockCypher\Api\WebHook();
$webHook-&gt;setUrl("http://mysite.com/dev/data/index.php");
$webHook-&gt;setEvent('unconfirmed-tx');

/// For Sample Purposes Only.
$request = clone $webHook;

$webHookClient = new \BlockCypher\Client\WebHookClient($apiContexts['BTC.main']);

/// Create WebHook
try {
    $output = $webHookClient-&gt;create($webHook);
} catch (Exception $ex) {
    ResultPrinter::printError("Created WebHook", "WebHook", null, $request, $ex);
    exit(1);
}

ResultPrinter::printResult("Created WebHook", "WebHook", $output-&gt;getId(), $request, $output);

return $output;


I had tested the callback url using requestb.in: 

http://requestb.in/zphhv1zp?inspect


I've been going crazy testing everything I could find online, but nothing really helped me out. What should I be using to retrieve the POST data?

PS: this is the code that I've been testing most recently


&lt;html lang="en"&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;?php
        $url = "http://requestb.in/zphhv1zp";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $data = curl_exec($ch);
        curl_close($ch);
        echo $data;

        // $inputJSON = file_get_contents('');
        // $input = json_decode( $inputJSON, TRUE );
        // echo $input['hash'];
    ?&gt;
&lt;/body&gt;
&lt;/html&gt;
Full disclosure: I'm BlockCypher's Developer Advocate. 

I'm not a PHP expert, but I know a number of our customers have had issues reading return data from PHP. This thread on Stack Overflow might help:

https://stackoverflow.com/questions/8945879/how-to-get-body-of-a-post-in-php