php getting contents of multiple urls
<p>i am trying to get constants of webpages and disply on my page.
i have following code</p>

<pre><code>$items = array();
$items[] = "http://www.domain.com?id=1";
$items[] = "http://www.domain.com?id=2";
$items[] = "http://www.domain.com?id=3";
$items[] = "http://www.domain.com?id=4";
$items[] = "http://www.domain.com?id=5";

foreach ($items  as $value) {
 $text = file_get_contents($value);
 echo $text;
 }
</code></pre>

<p>i got error</p>

<pre><code>file_get_contents can't be empty
</code></pre>

<p>i think  file_get_contents get called before it finish getting data from first site, 
this is my thinking.</p>

<p><strong>how to solve this issue as some times i must have urls in 100s</strong></p>

<p>dear i am getting this error</p>

<pre><code>Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /Applications/XAMPP/xamppfiles/htdocs/test/test.php on line
</code></pre>

<p>but this also shows the constants of first few pages then start giving this error.</p>

<p>i have checked and all urls are perfect.</p>

<p>Thanks </p>
