web crawler - PHP Start script where it timed out -


i'm building web crawler start test on shared webhosting, not allow set_time_limit can't make sure script keeps running longer 30 seconds.

what best way start php script next time timed out before? thinking saving last crawled url in file there other options?

edit: scallioxtx right, can't use variables goto label. around large if statement, @ point i'd it's best not use goto @ all. here alternative method:

<?php      // load label number database or text file $label_num      if($label_num <= 1) {         // stuff     }      if($label_num <= 2) {         // more stuff     }      // ...  ?> 

old (incorrect) method:

you can of course use goto: http://us1.php.net/goto

i use temporary measure until better hosting.

here's do:

  1. at various locations throughout code, write label (ex. count1:, count2:, etc.)
  2. at each location added label, write label name database or text file
  3. at beginning of script, load value , jump specified label

example:

<?php      // load label number database or text file $label_num      if($label_num) {         goto $label_num;     }      count1:     // stuff      count2:     // more stuff      // ...  ?> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -