title: PHP Parallel curl requests
body: <p>I am doing a simple app that reads json data from 15 different URLs. I have a special need that I need to do this serverly. I am using <code>file_get_contents($url)</code>.</p>
  
  <p>Since I am using file_get_contents($url). I wrote a simple script, is it:</p>
  
  <pre><code>$websites = array(
      $url1,
      $url2,
      $url3,
       ...
      $url15
  );
  
  foreach ($websites as $website) {
      $data[] = file_get_contents($website);
  }
  </code></pre>
  
  <p>and it was proven to be very slow, because it waits for the first request and then do the next one.</p>