Created
April 30, 2014 16:50
-
-
Save zacwasielewski/552c6fb85b417a1b8693 to your computer and use it in GitHub Desktop.
How to process a JSON POST request in PHP
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 | |
if ($_SERVER['REQUEST_METHOD']=='POST') { | |
$json = json_decode(@file_get_contents('php://input')); | |
print_r($json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment