title: StackOverflow API and PHP CLI and JSON
body: <p>I'm new to JSON and APIs and I want to make a PHP CLI script that will use StackOverflow API. I've made myself a key and this is my code so far:</p>
  
  <pre><code>&lt;?php
  
  //Call stack API .$key
  $google_url = "http://api.stackoverflow.com/1.1/stats";
  
  //Get and Store API results into a variable
  $result = file_get_contents($google_url);
  //$jsonArray = json_decode($result);
  print_r($result);
  //var_dump($jsonArray);
  
  ?&gt;
  </code></pre>
  
  <p>But the <code>print_r($result);</code> returns some strange characters.  I can't read it could you give me some info? Any help will be appreciated. The whole project will be an open source search engine about StackOverflow posts and comments!</p>