title: PHP echo statement with URL parameter
body: <p>I wrote a mini script in PHP to send a POST request to the web server:</p>
  
  <pre><code>&lt;?php
  
  $cid = file_get_contents('cid');
  
  function httpPost($url)
  {
      $ch = curl_init();
  
      curl_setopt($ch,CURLOPT_URL,$url);
      curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
      curl_setopt($ch,CURLOPT_POST, true);
  
      $output=curl_exec($ch);
  
      curl_close($ch);
      return $output;
  }
  
  echo httpPost("http://172.17.0.1:2375/containers/$cid/stop?t=5");
  
  ?&gt;
  </code></pre>
  
  <p>Yes, this is Docker.  I'm using the <a href="http://blog.flux7.com/blogs/docker/docker-tutorial-series-part-8-docker-remote-api" rel="nofollow">remote API in Docker</a>, and this little piece of script works!
  <strong>However, the ?t=5 at the end of the URL, gets ignored.</strong>
  I guess it has to do with the <strong>?</strong>.</p>
  
  <p>How do I get this URL properly formatted, so that the ?t=5 works correctly?</p>
  
  <p>(I tried 1,001 ways so far, with quotes and double quotes, with no luck.  After more than 4 hours spent on this, I thought stackoverflow could help?)</p>
  
  <p>Thanks...</p>
  
  <p>NOTE: the "cid" is only a file on the hard-drive, that stores the container id.  So I'm retrieving the container id from the file, and passing it to the URL (this part works, anyway).
  The complete URL is written by me, i.e. not parsed.</p>