for($i=1;$i<100;$i++)
{
$results[]=file_get_contents("http://www.domain.com/directory/page.php?id=$i");
}
print_r($results);
Or if you already have the ids in any array you could loop over them
foreach($arrayOfIDS as $id)
{
$results[]=file_get_contents("http://www.domain.com/directory/page.php?id=$id");
}
print_r($results);