Skip to content

Instantly share code, notes, and snippets.

@davidkryzaniak
Created May 4, 2014 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidkryzaniak/1f7b8cedcc86ab41a58e to your computer and use it in GitHub Desktop.
Save davidkryzaniak/1f7b8cedcc86ab41a58e to your computer and use it in GitHub Desktop.
<?php
//Get the body of the request
$body = file_get_contents("php://input");
if(!empty($body)){
$alertData = json_decode($body,TRUE);
//Save to database... or other stuff
}else{
throw new Exception("Invalid Request");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment