title: How to catch the HTTP POST request sent by a Shopify Webhook
body: <p>I'm somewhat of a noob, and not afraid to admit that, I'm working on this project as a learning experience to get better with php and serverside script/ing handling.</p>
  
  <p>I'm trying to come up with a way to use Shopify and simultaneously update an off server database every time an order is fulfilled from my Shopify cart. So for example, someone buys something from my online store, I want it to update my home databases inventory to show that it now has one less item.</p>
  
  <p>I've come to the conclusion that the best way to do this would be to setup a <a href="http://api.shopify.com/webhook.html" rel="noreferrer">webhook notification</a> that sends an HTTP POST request to my server, then I'd have my server catch the POST and parse it into an XML. I will then read the XML via a php script that will update my database.</p>
  
  <p>I dont have a problem with the php, but what I can't seem to figure out is how to catch the webhook on my server. Webhook asks me for a URL to send the POST request to, my question to you is; what is the url?</p>
  
  <p>I've done some research and found that you can catch the POST request a number of ways, through html, php, Access-Control-Allow-Origin, etc. However, since I'm still new to this, I don't really understand exactly how to do these. I've tried with an HTML hidden action form but couldn't seem to get it to catch the XML.</p>
  
  <p>All I want to do is have the webhook send its POST request, and have it caught as a .xml. So that I can read the xml at the end of each day, and update the database accordingly.</p>
  
  <p>If you can think of a better or simpler way to do this, by all means please give me your suggestions. I'd like this to be secure, so methods like Access-Control-Allow-Origin are out of the question.</p>
  
  <p>tl;dr:
  What do I have to do on my server to catch a webhook notification? What script should I have on my server to give to the webhook? How do I write the callback script?</p>