How to send JSON string via POST in PHP
Some modern web services and APIs that requires API consumers to send JSON via a POST request. Here’s how you would program to do such task. Once we’ve got the response from the API Provider, we can decode the JSON back to an array using json_decode() function, so that PHP can process or display to client easily.