title: How do I make an asynchronous GET request in PHP?
body: <p>I wish to make a simple GET request to another script on a different server.  How do I do this?</p>
  
  <p>In one case, I just need to request an external script without the need for any output.</p>
  
  <pre><code>make_request('http://www.externalsite.com/script1.php?variable=45'); //example usage
  </code></pre>
  
  <p>In the second case, I need to get the text output.</p>
  
  <pre><code>$output = make_request('http://www.externalsite.com/script2.php?variable=45');
  echo $output; //string output
  </code></pre>
  
  <p>To be honest, I do not want to mess around with CURL as this isn't really the job of CURL. I also do not want to make use of http_get as I do not have the PECL extensions.</p>
  
  <p>Would fsockopen work? If so, how do I do this without reading in the contents of the file? Is there no other way?</p>
  
  <p>Thanks all</p>
  
  <h2>Update</h2>
  
  <p>I should of added, in the first case, I do not want to wait for the script to return anything. As I understand file_get_contents() will wait for the page to load fully etc?</p>