title: Read Json data response using php
body: <p>How can I read a JSON data response using php? The response t comes after user authentication done from a third party. Primarily, I just want <code>displayName</code> and <code>preferredUsername</code> data.</p>
  
  <p><strong>Json response:</strong>     </p>
  
  <pre><code> {
        "stat": "ok",
        "profile": {
          "providerName": "testing",
          "identifier": "http://testing.com/58263223",
          "displayName": "testing",
          "preferredUsername": "testing",
          "name": {
            "formatted": "testing"
          },
          "url": "http://testing.com/testing/",
          "photo": "https://securecdn.testing.com/uploads/users/5826/3223/avatar32.jpg?1373393837",
          "providerSpecifier": "testing"
        }
      }
  </code></pre>