title: get JSON data from url via curl
body: <p>I am trying to get JSON data from the url via curl connection. When I open the link: it shows {"version":"N/A","success":true,"status":true}.<br>
  Now, I want to get above content.</p>
  
  <p>So far I have use this:  </p>
  
  <pre><code>$loginUrl = 'http://update.protect-website.com/index.php?plugin=firewall&amp;action=getVersion';
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_URL,$loginUrl);
  $result=curl_exec($ch);
  curl_close($ch);
  var_dump(json_decode($result));
  </code></pre>
  
  <p>However, I always get NULL, Does someone have idea where is wrong?</p>