Created
September 15, 2014 12:04
-
-
Save jleyva/ef5a30f93b0fffa17e12 to your computer and use it in GitHub Desktop.
MDL-47163
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 | |
/** | |
* Notification REST service for testing Airnotifier V2 | |
*/ | |
$body = file_get_contents('php://input'); | |
$data = json_decode($body); | |
if (!$data) { | |
$log = "Error decoding body, BODY was: " . $body; | |
} else { | |
$log = "JSON data correctly received and parsed: \n"; | |
$log .= var_export($data, true); | |
} | |
$log = "\n=======================================\n\n\n" . date("Y-m-d H:i:s") . "\n" . $log; | |
file_put_contents("log.txt", $log, FILE_APPEND); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment