Created
March 9, 2016 19:46
-
-
Save antonbabenko/9c0bbc0879c2618d73ab to your computer and use it in GitHub Desktop.
Debug SNS messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Fetch the raw POST body containing the message | |
$postBody = file_get_contents('php://input'); | |
error_log($postBody); | |
// JSON decode the body to an array of message data | |
$message = json_decode($postBody, true); | |
if ($message) { | |
// Do something with the data | |
error_log($message['Message']); | |
error_log($message['SubscribeURL']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment