title: Saving a curl response into a php variable
body: <p>I am trying to access my ec2's public hostname from inside the instance.</p>
  
  <p>I would like to run this command</p>
  
  <pre><code>curl http:// 169 254.169.254/latest/meta-data/public-hostname
  </code></pre>
  
  <p>inside a php script and save the response to a variable.  How can I do this?</p>