title: why does file_get_contents get nothing from the web service?
body: <p>we're using file_get_contents to communicate with a web service, which creates users and if succeeds it returns a JSON object with the details of the new created user. 
  the code below shows how we do it, <strong>the user is successfully created, meaning we can see it from the back-end, however, we just can't get the JSON response, it returns nothing</strong>.</p>
  
  <pre><code>public function register(){
      $username = "testing";
      $email = "testingemail@test.com";
      $password = "testpsd";
  
      $userData = '{"$xmlns": {"pluser": "http://xml.webservice.com/auth/data/User"},'
              .'"pluser$userName": "'.$username.'",'
              .'"pluser$password": "'.$password.'",'
              .'"pluser$fullName": "fullname",'
              .'"pluser$email": "'.$email.'"}';
      $url = 'https://webservice.com?form=json';
      $cparams = array('http' =&gt; array('method' =&gt; 'POST','ignore_errors' =&gt; true));
      $cparams['http']['content'] = $userData;      
      $cparams['http']['request_fulluri'] = true;
      $cparams['http']['header'] = 'Content-type: application/json';
      $context = stream_context_create($cparams);
  
      $fp = @file_get_contents($url,false,$context);$res = stream_get_contents($fp);
      print_r($res);
  }
  </code></pre>
  
  <p>at first we thought the web service was supposed to return nothing, so we tested against it in c# which worked perfectly fine, meaning we got the create response of something like {"stutas":"successful","userCreated":"true"}
  here is the c# code:</p>
  
  <pre><code>String url = "https://webservice.com?form=json";
  HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url);
          req.Method = "POST";
  
          string strRequest = "exactly the same json string";
          req.ContentLength = strRequest.Length;
          StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
          streamOut.Write(strRequest);
          streamOut.Close();
          StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
          while (!streamIn.EndOfStream)
              Console.WriteLine(streamIn.ReadToEnd());
          streamIn.Close();
  
          Console.ReadKey();}
  </code></pre>
  
  <p>is there anything missing or misconfigured in the php code?</p>