HELP!!! please help me with this simple code! HELP!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kapernik
Forum Newbie
Posts: 1
Joined: Tue Apr 07, 2009 4:03 am

HELP!!! please help me with this simple code! HELP!!!

Post by kapernik »

Can you help me with this code?!

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;
}
?>
Last edited by kapernik on Tue Apr 07, 2009 4:57 am, edited 1 time in total.
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: HELP!!! please help me with this simple code! HELP!!!

Post by Apollo »

See viewtopic.php?f=1&t=8815, especially nr. 4, 7, and 9.
Post Reply