while pageNum totalPages totalPages children this- pcntl- listChildren

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
while($pageNum <= $totalPages) //$totalPages
{
$children = $this->pcntl->listChildrens();
//var_dump($children);
if(count($children) >= 3)
{
sleep(1);
continue;
}
print_r("Parsing page ".$pageNum." out of ".$totalPages."\n");
//print_r(number_format(($pageNum*100/$totalPages),2)."% complete...\n");
$res = $this->pcntl->create($p = array(
'action' => 'fullScanChild',
'make' => $pageNum,
), $useProps = true);
$pageNum++;
}
print_r("Fullscan finished\n");
}