The problem is: I need to catch the information about the organizations from all those pages $lines. But when i execute this code with $p<=3000 it just give me some pages (about 30-50, anytime the result is a different)... and stop.
Is this a code problem or my PC is do not have enough power for this operation?
I use Amilo pro v 2030, 896mb of RAM.
Somebody can taste this code on a PC with more than 2GB RAM??
Thanks!!!!!!!!!!!!!
Code: Select all
<?php
//echo "<plaintext>";
echo '<table border=1 bgcolour=green>
<tr><td>N</td><td>Name</td><td>Adress</td><td>tel</td><td>Predmet na deqtelnost</td></tr>';
//the number of pages - [b]12010[/b]
for ($p=344;$p<=3750;$p++)
{
$lines = file("http://www.econ.bg/companies/company$p/unikredit_lizing_ad");
//print_r($lines);
for ($i=248; $i<259; $i++)
{
$a[$i]= strip_tags ($lines[$i],'<br>');
if (strlen($a[$i])<3)
{
$a[$i]=$a["$i"]="no information";
}
}
$tabl= '<tr><td>'.$p.'</td><td>'.$a[248].'</td><td>'.$a[250].'</td><td>'.$a[251].'</td><td>'.$a[258].'</td></tr>';
//$tabl++;
echo $tabl;
}
?>