Hi Terion,

I thing the problems is the time limit on your Server.

Try this now:

Test the var before insert into db:

After u remove from the db the unwanted lines.

On the end of the file u do this:





        //do the task
        //on the end of the file u put this:

U'll need to make A.php, B.php, C.php, D.php, etc... file, with the same
content., did u get it?

-----Mensagem original-----
De: Miller, Terion [mailto:tmil...@springfi.gannett.com] 
Enviada em: terça-feira, 12 de maio de 2009 10:24
Para: Phpster; Miller, Terion
Cc: Jônatas Zechim; PHP-General List
Assunto: Re: RES: [PHP] CURL problems still

> Bastien, could you give me an example of what you mean?
> would it be $Name = ""
> like that?
> Thanks for the ideas everyone!

>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
> Try Imitliazing the variables at the top of the loop to empty strings
> or zeros
> Bastien

Yep, that's it

$_thing = '';


Well I tried it and still it stopped at the "C's" maybe I put them in the
wrong spot?  I tried something yesterday where I commented out the "C's"
url, and it ran through the "F's" could a setting somewhere be restricting
how many files it can run...I am just stumped, the script runs fine, inserts
the data I'm wanting etc, just can't get it to run all 26 pages....argh.

foreach($html->find('table') as $table) {    foreach($table->find('tr') as
$tr)    {              //set variables to nada ? $name = ''; $age = '';
$warrant = ''; $bond = ''; $wnumber = ''; $crime = '';
// Grab children       $cells = $tr->children();
if($cells[0]->plaintext != "Name")        {                    for ($i = 0;
$i < count($cells); $i++)            {
switch ($i){                 case 0: // Name                     $name =
$cells[$i]->plaintext;                     echo $cells[$i]->plaintext;
break;                 case 1: // Age                     $age =
$cells[$i]->plaintext;                     break;                 case 2: //
Warrant type                     $warrant = $cells[$i]->plaintext;
break;                 case 3: // Bond amount                     $bond =
$cells[$i]->plaintext;                     break;                 case 4: //
Warrant number                     $wnumber = $cells[$i]->plaintext;
break;                  case 5: // Offence description
$crime = $cells[$i]->plaintext;                     break;
Default:                     echo "Uh-oh<br />";                 }
}                                   }                    // Build your
INSERT statement here              $query = "INSERT into `warrants` (name,
age, warrant, bond, wnumber, crime) VALUES (";    $query .= " '$name',
'$age', '$warrant', '$bond', '$wnumber', '$crime' )";        $wid =
mysql_insert_id();                echo $query;                // run query
mysql_query($query) or die (mysql_error());

---------end code-------------------------------

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to