title: PHP script to sit and wait to capture a Webhook
body: <p>I am wanting to capture a Webhook in PHP. I dont know when the webhook will come through so I have to keep the site actively looping until it does. The response comes through in a JSON array, so I want to display this to see if it works if possible.</p>
  
  <p>Could someone please send through some sample PHP to do this?</p>
  
  <p>I tried it like this and I kept getting errors after 30 seconds</p>
  
  <pre><code>&lt;?php
  $webhookContent = "";
  
  do {
  $webhook = fopen('php://input' , 'rb');
  while (!feof($webhook)) {
      $webhookContent .= fread($webhook, 4096);
  }
  fclose($webhook);
  
  error_log($webhookContent);
  
  } while ($webhookContent == "");
  
  echo $webhook;
  ?&gt;
  </code></pre>
  
  <p>The error I got was </p>
  
  <p>Fatal error: Maximum execution time of 30 seconds exceeded in /home/passames/public_html/hook/hook.php on line 11</p>
  
  <p>I also tried to echo $webhookcontent with no luck.</p>
  
  <p>Hope someone can help.</p>