title: How to consume a json object in PHP
body: <p>This may be simple to some but I am a newbie in PHP and json and was wondering how do I consume such a cURL below. Like save the data in a database in PHP. Anyone? Thank you.</p>
  
  <pre><code>curl -i \
   -H "Accept: application/json" \
   -H "Content-Type: application/json" \
   -u username:password \
   -d '{
          "service_name" : "MPESA",
          "business_number" : "888555",
          "transaction_reference" : "DE45GK45",
  
  
        }' \
  "http://your_domain.com/transaction_consumer"
  </code></pre>