title: Why does cURL always return a status code?
body: <p>I have some PHP code that calls into the cURL library.  I'm using it to get JSON data.</p>
  
  <p>I have set cURL opt 'CURLOPT_RETURNTRANSFER' to 1, but still get status code..</p>
  
  <p>Code follows:</p>
  
  <pre><code>&lt;?php
  function fetch_page($url)
  {
  
      $ch = curl_init();
  
      $array = array(
          'include'=&gt;'ayam'
      );
  
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $array);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
      $result = curl_exec ($ch);
      curl_close ($ch);
  
      return $result;
  } 
  
  $return  = fetch_page(MY_LINK_URL);
  
  echo json_decode($return);
  ?&gt;
  </code></pre>