title: how to write a php to get the json post from a webhook?
body: <p>I add my url xxx/getjson.php to a webhook and once a person signup, it will post the json data to my url. I use <a href="http://requestb.in/">http://requestb.in/</a> to check the data and the result is like this:</p>
  
  <pre><code>payload{ "signup": { "address": { "address1": "XX",
                                    "country": "United States"},                     
                       "id":22}}
  token
  </code></pre>
  
  <p>the php script i write is:</p>
  
  <pre><code>$obj=json_decode($_POST);            //cannot get the json data
  
  $userid=$obj-&gt;signup-&gt;id;
  </code></pre>
  
  <p>Also I don't know how to use the 'payload'</p>
  
  <p>I find a similar sample code and I test it well using their web hooks. 
  <a href="http://support.unbounce.com/entries/307685-how-does-the-form-webhook-work">http://support.unbounce.com/entries/307685-how-does-the-form-webhook-work</a>
  However, they use 'data.json' rather than 'payload' as parameters.</p>
  
  <pre><code>$form_data = json_decode($unescaped_post_data['data_json']);  
  $userid= =$form_data-&gt;signup-&gt;id;
  </code></pre>
  
  <p>I used their stripslashes_deep function, and replaced the 'data_json' with 'payload' but still doesn't work. </p>
  
  <p>I really appreciate your help.Thanks!</p>