title: php json response empty
body: <p>My android app is hitting my api with following code</p>
  
  <pre><code>&lt;?php
  $token = $_GET['token'];
  $encrypted_data = base64_encode($token);
  $sendUrl = "https://example.com";
  $url = "$sendUrl?token=$token";
  $result = file_get_contents($url);
  $data_array = json_decode($result, true);
  $data_array['url'] = 'https://example2.com/';
  $result = json_encode($data_array);
  $arr = json_decode($result, true);
  echo json_encode($arr, JSON_UNESCAPED_SLASHES), "\n";
  ?&gt;
  </code></pre>
  
  <p>My app waits for 200 response and JSON output received from $senUrl but instead its getting empty 200 response with JSON. 
  How could I send JSON and wait for $sendUrl to respond before sending 200</p>